I'm building a GitHub Pages site and trying to install Ruby for my Mac as described here. When I run ruby-install ruby , I get the following:
linking shared-object -test-/arith_seq/extract.bundle
Undefined symbols for architecture arm64:
"_rb_arithmetic_sequence_extract", referenced from:
_arith_seq_s_extract in extract.o
"_rb_ary_new_capa", referenced from:
_arith_seq_s_extract in extract.o
"_rb_ary_store", referenced from:
_arith_seq_s_extract in extract.o
"_rb_define_singleton_method", referenced from:
_Init_extract in extract.o
"_rb_path2class", referenced from:
_Init_extract in extract.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [../../../../.ext/arm64-darwin22/-test-/arith_seq/extract.bundle] Error 1
make[1]: *** [ext/-test-/arith_seq/extract/all] Error 2
make: *** [build-ext] Error 2
!!! Compiling ruby 3.1.2 failed!
I'm totally unfamiliar with Ruby and don't know how to make any sense of this. Any ideas? Thanks
I was running into same issue as you after following the Jekyll guide.
Christian from your comments supplied a very detailed solution and explanation as to what's caused it.
After updating to macOS 12.6 or 13.0, you might still be able to install 2.7.x and 3.x versions of Ruby with rbenv or asdf. With ruby-install, you’ll need to add the --enable-shared flag. Once 2.7.7 and 3.1.3 are released, you should no longer need to add any flags.
Install for me on Mac OS 12.6 worked with ruby-install 3.1.2 -- --enable-shared
Integrating CouchbaseLite in iOS application causing error through cocoapods . Here is error i am getting :
Undefined symbols for architecture x86_64: “OBJC_CLASS$_CBLManager”,
referenced from: objc-class-ref in ViewController.o ld: symbol(s) not
found for architecture x86_64 clang: error: linker command failed with
exit code 1 (use -v to see invocation)
I also raised issue on couchbase-lite forum :
https://forums.couchbase.com/t/bjc-class-ref-error-in-couchbase-lite-in-ios-cocoapods-xcode-9/14744?u=st.shubh.tiwari
The “Other Linker” flags was set to “-ObjC”. Change that to $(inherited). That will ensure that Cocoapods is able to include the appropriate flags. Otherwise your cocoa pods install won’t go through fine.
This really helps me to resolve my issue . Big Thanks to CouchBase community.
While trying to build the latest GnuPG (2.1.1 modern), my build fails when trying to link t-stringhelp. make outputs:
ld: warning: ignoring file libcommon.a, file was built for archive which is not the architecture being linked (x86_64): libcommon.a
Undefined symbols for architecture x86_64:
"_compare_filenames", referenced from:
_main in t-stringhelp.o
"_make_absfilename_try", referenced from:
_main in t-stringhelp.o
"_make_filename_try", referenced from:
_main in t-stringhelp.o
"_percent_escape", referenced from:
_main in t-stringhelp.o
"_strconcat", referenced from:
_main in t-stringhelp.o
"_xstrconcat", referenced from:
_main in t-stringhelp.o
I don't know how to fix this as libcommon is part of the source, so it should build fine. When building with CFLAGS="-m64" (-arch x86_64 does nothing), I get this:
ld: warning: ignoring file ../common/libgpgrl.a, file was built for archive which is not the architecture being linked (x86_64): ../common/libgpgrl.a
Undefined symbols for architecture x86_64:
"_gnupg_rl_initialize", referenced from:
_main in gpg.o
I've also rebuilt all the depandancies (as I built them on Mavericks), except pinentry, as it can't find libiconv which is also installed. My configure outputs that its target is Darwin (x86_64-apple-darwin14.0.0), so this should work. I have also got all the latest prerequisites, tried to install everything in its own directory (--prefix=/usr/local/gnupg-2.1.1), build all the dependancies and GnuPG as 32 bits (again, fails on same error), created a separate build folder and tried to build in there, but only one thing so far has solved the error: looking at how libgpgrl.a is being built - it's only component is common/gpgrlhelp.c - so I cd'ed into g10 and tried to build gpg2, replacing ../common/libgpgrl.a with ../common/gpgrlhelp.o, the lib common.a with all of its object files, for all the libraries that didn't work. Then some programs weren't linking to libksba libgcrypt and libassuan, so I changed the Makefiles, so that they could link. I can now compile all the code well, I installed everything, but I get a new error, when I try to run gpg2:
dyld: lazy symbol binding failed: Symbol not found: __gcry_mpi_init
Referenced from: /usr/local/gnupg-2.1.1/lib/libgcrypt.20.dylib
Expected in: flat namespace
dyld: Symbol not found: __gcry_mpi_init
Referenced from: /usr/local/gnupg-2.1.1/lib/libgcrypt.20.dylib
Expected in: flat namespace
I have everything in my path, which is:
/usr/local/gnupg-2.1.1/bin:/usr/local/gnupg-2.1.1/lib:/Library/Frameworks/Python.framework/Versions/3.4/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/local/mysql/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
I could compile GnuPG-2.0.22 on Mavericks, but no version of GnuPG builds on Yosemite.
Please help, I'm really confused.
I’ve been running GnuPG 2.1 on Yosemite 10.10.2 (the latest public beta of as of this writing) for about a week and it’s been fine.
You can follow these directions for using brew tap or you can use the raw URL: brew install https://github.com/mtigas/homebrew-gpg21/raw/master/Formula/gnupg2.rb.
Note this formula installs GnuPG 2.1; not GnuPG 2.1.1, the version originally asked about. I can confirm this bug where gpg2 --refresh-keys fails with some keyservers using 2.1 (apparently fixed in 2.1.1) but it’ll get you 90% there.
It shouldn’t be hard to update the formula to install 2.1.1.
Update
Someone submitted a pull request for GNuPG 2.1.1 support—I just tried it and it worked great. Short answer: brew install https://raw.githubusercontent.com/calebthompson/homebrew-gpg21/2.1.1/Formula/gnupg2.rb.
Personally, I would install homebrew, which is a one-liner pasted from their website (http://brew.sh) then do
brew install gnupg
If therw are any problems, run
brew doctor
and heed the good doctor's advice.
Turns out I had a ranlib in /usr/local/bin/ranlib. It was broken, I don't know how it got there (I did try to build gcc at some point, it doesn't support make uninstall, so that's probably why). I just ran:
sudo mv /usr/local/ranlib /usr/local/ranlib_old
Then I just rebuilt all the dependancies, and it worked!
I am trying to build eigen on my Mac Air with Lion. I downloaded eigen3 (from http://eigen.tuxfamily.org/index.php?title=Main_Page) and have successfully run make install. However, when I try to run make check, I get the following error.
[ 1%] Built target sparse_extra_2
Linking CXX executable openglsupport
ld: warning: ignoring file /System/Library/Frameworks//GLEW.framework/GLEW,
missing required architecture x86_64 in file
Undefined symbols for architecture x86_64:
"_glewExperimental", referenced from:
test_openglsupport() in openglsupport.cpp.o
"_glewInit", referenced from:
test_openglsupport() in openglsupport.cpp.o
"_glBegin", referenced from:
test_openglsupport() in openglsupport.cpp.o
I feel that this issue has to do with glew. I am now trying to install different versions of glew, but that doesn't seem to do anything.
Any advice on how to resolve the error? What does undefined symbols for architecture x86_64 mean anyway?
This probably means your installation of GLEW is incomplete. You can properly disable testing of OpenGL with cmake . -DEIGEN_TEST_NO_OPENGL=ON. Finally, note that Eigen is a header only library, so there is nothing to compile to use it.
I used Xcode to build a example of boost, but as you see followed it is failed. And the error
I've got is:
Undefined symbols for architecture x86_64:
"boost::system::system_category()", referenced from:
___cxx_global_var_init2 in sync_client.o
boost::asio::error::get_system_category() in sync_client.o
boost::system::error_code::error_code() in sync_client.o
"boost::system::generic_category()", referenced from:
___cxx_global_var_init in sync_client.o
___cxx_global_var_init1 in sync_client.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I don't know how I can fix it. I've added the include and libs path of boost into Xcode Build Setting. Does anyone have any idea about this problem?
Either link against a pre-built version of libboost-system.so or pull in libs/system/src/error_code.cpp (from your boost source package), into your project.