Broken c++ std libraries on macOS High Sierra 10.13
I had exactly the same problem after transferring to macOS High Sierra (though, errors were not the same, but similar).
I found a workaround by renaming /usr/local/include
to /usr/local/include_old
(well, name does not really matter, just the fact that g++/clang
will not search for headers in this folder anymore).
Overriding MacOS High Sierra /usr/lib (or how to static link)
This worked after coping the libraries into the /usr/local/lib folder.
gcc -I ./curl-7.58.0/include/curl -I ./cJSON-master /usr/local/lib/libcjson.1.7.1.dylib /usr/local/lib/libcurl.4.dylib mypgm.c -o mypgm
I think the relative path (./) for the libraries rather then absolute path is the key.
Does use of C++17 std::filesystem REQUIRE MacOS 10.15? (Xcode 11.1)
It means that (using Apple's tools/libraries), you cannot use std::filesystem
in a project targeting a version of Mac OS before 10.15.
If you have a new enough Xcode, etc. you should be able to build a project on 10.14 (say) that targets 10.15 and uses filesystem
types and calls. But it won't run on 10.14.
bison 3.0.4 fails in Illegal instruction: 4 on macOS High Sierra 10.13
This bug was reported on bug-bison on September 16 (2017), and according to the reply later that day by a bison maintainer, the bison source repository was updated shortly thereafter to fix the problem. However, a new source distribution was not created; in order to use the fix, it would be necessary to sync with the maint
branch in the Bison Git repository, which includes a more recent version of gnulib. (I believe that building from the maint branch is not as simple as just downloading the source tarball, so this is not entirely satisfactory. Until there is a new bison source release, the fix you indicate may be the simplest option.)
The gnulib fix is described in the bug-gnulib message linked from the bison bug report.
As indicated in your link, the problem affects a number of other software packages, not just bison. That's not much consolation.
Related Topics
What Is a "Regular Type" in the Context of Move Semantics
How to Create Std::Array with Initialization List Without Providing Size Directly
Do I Have to Use Atomic<Bool> for "Exit" Bool Variable
Is C++ Static Member Variable Initialization Thread-Safe
Implicit Conversion When Overloading Operators for Template Classes
In C/C++, Is Char* Arrayname[][] a Pointer to a Pointer to a Pointer or a Pointer to a Pointer
Pointer to Array of Unspecified Size "(*P)[]" Illegal in C++ But Legal in C
Why Is Volatile Deprecated in C++20
How to Detect Whether Windows Is Shutting Down or Restarting
Std::Vector Reserve() and Push_Back() Is Faster Than Resize() and Array Index, Why
C++11 Anonymous Union with Non-Trivial Members
Does Delete Work with Pointers to Base Class
Simpler Way to Create a C++ Memorystream from (Char*, Size_T), Without Copying the Data
How to Rotate a N X N Matrix by 90 Degrees
How to Parallelize a for Loop Through a C++ Std::List Using Openmp