I've bern struggling to install ns-2.34 on my just uppgraded Mac with ML.
This is what I get
-L/Users/bcaceiro/desktop/DEI/IRC/ns-allinone-2.34/tcl8.4.18/unix -ltcl8.4 -framework CoreFoundation -lX11 -sectcreate __TEXT __info_plist Wish-Info.plist -o wish
ld: library not found for -lX11
collect2: ld returned 1 exit status
make: *** [wish] Error 1
tk8.4.18 make failed! Exiting ...
And, I have Xcode installed, with the command line tools , all installed, but can't seem to get this working.
Thanks in advance!
I see that the message contains a reference to X11, X11 is not installed by default in Mountain Lion. The first invocation of /Applications/Utilities/X11.app will prompt you to find the current Apple Knowledge Base Article for installing X11.
Download and install the latest version of XQuartx (2.7.3 at time of writing) from http://xquartz.macosforge.org
Related
I recently updated to MacOS Monterey. When I try compiling any fortran program using gfortran, I get the following error message:
ld: library not found for -lm
collect2: error: ld returned 1 exit status
How do I resolve this? I tried
brew reinstall gcc
brew reinstall gfortran
without being able to resolve the issue. All of these programs previously compiled without issue.
I just had the same problem after upgrading to Monterey. Turns out XCode had not be (re)installed. Run:
xcode-select --install
I'm programing ADA with GPS. The problem is that when I compile any code with GPS I get this error:
ld: library not found for -lSystem collect2: error: ld returned 1 exit status
I have updated and reinstalled everything (xcode, gcc), reinstalled GPS, and installed comand line tools.
That's what GPS show to me by terminal:
gprbuild -d -P/Users/pedromarti/Desktop/helloWorld/default.gpr /Users/pedromarti/Desktop/helloWorld/src/main.adb Bind [gprbind] main.bexch [Ada] main.ali Link [link] main.adb ld: library not found for -lSystem collect2: error: ld returned 1 exit status gprbuild: link of main.adb failed gprbuild: failed command was: /users/pedromarti/opt/gnat/2019/bin/gcc main.o b__main.o -L/Users/pedromarti/Desktop/helloWorld/obj/ -L/Users/pedromarti/Desktop/helloWorld/obj/ -L/users/pedromarti/opt/gnat/2019/lib/gcc/x86_64-apple-darwin17.7.0/8.3.1/adalib/ /users/pedromarti/opt/gnat/2019/lib/gcc/x86_64-apple-darwin17.7.0/8.3.1/adalib/libgnat.a -Wl,-rpath,#executable_path/ -Wl,-rpath,#executable_path/../../..//opt/gnat/2019/lib/gcc/x86_64-apple-darwin17.7.0/8.3.1/adalib -o main [2021-03-18 13:38:56] process exited with status 4, elapsed time: 02.57s
I don't know what more I can do. If anyone knows a solution, you are welcome!
You’re using GNAT Community Edition 2019. I can’t tell which OS release you’re running on, and in this case I don’t think it makes a difference.
The README from the download site says
== Mac OS: Xcode is now needed ==
On Mac OS, GNAT Community 2019 requires Xcode version 10 or above to be
installed. Once you do have Xcode installed, if you still observe an error
of the form:
ld: library not found for -lSystem
then you might have to execute the following:
xcode-select -s /Applications/Xcode.app/Contents/Developer
Xcode is large but free, and takes a while to download from the App Store (go to the Develop tab).
If your building system has a cache system, you need to clear the cache.
For example, if you are using cmake, remember to delete cmake build directory to avoid the cmakecache take it to the wrong link.
I wanted to compile a ffmpg x264 lib for android https://github.com/edisonw/android-ffmpeg-x264. I am using Mountain Lion (Mac OSX 10.8.4). I already installed libtool and yasm via brew but still get the following error:
ffmpeg/libavdevice/libavdevice.a: could not read symbols: Archive has no index; run ranlib to add one
collect2: ld returned 1 exit status
make: *** [/Users/Test/github/android-ffmpeg-x264/Project/obj/local/armeabi/libencoding.so] Error 1
After that it stuck and I have no Idea why, according to the owner it was possible to build on a Lion (Mac OSX 10.7.x).
Thank you for any help!
Namaste, all.
I am trying to install Plone 4.1rc3 on Mac OS X Lion build 11A494a, with Python 2.7 installed. I've tried the DMG installer and the Unified Installer and both error out. The latter's log file contains the following (which I believe is the pertinent, applicable part):
gcc -I"/Users/benjamin/Plone/Python-2.6"/include -L"/Users/benjamin/Plone/Python-2.6"/lib -R"/Users/benjamin/Plone/Python-2.6"/lib -o python.exe \
Modules/python.o \
libpython2.6.a -ldl -framework CoreFoundation
Undefined symbols for architecture x86_64:
"_Py_Main", referenced from:
_main in python.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make: *** [python.exe] Error 1
This is my first time using Python and Plone in any capacity, so I am likely overlooking something elementary. Any help would be appreciated.
Try this again. Unified Installer is working on Lion release with Xcode 3 and/or 4 installed.
After I download UnitTest++ version 1.4 (from http://sourceforge.net/projects/unittest-cpp/) and do a make, I get:
$ make
src/AssertException.cpp
src/Test.cpp
src/Checks.cpp
src/TestRunner.cpp
src/TestResults.cpp
src/TestReporter.cpp
src/TestReporterStdout.cpp
src/ReportAssert.cpp
src/TestList.cpp
src/TimeConstraint.cpp
src/TestDetails.cpp
src/MemoryOutStream.cpp
src/DeferredTestReporter.cpp
src/DeferredTestResult.cpp
src/XmlTestReporter.cpp
src/CurrentTest.cpp
src/Posix/SignalTranslator.cpp
src/Posix/TimeHelpers.cpp
Creating libUnitTest++.a library...
src/tests/Main.cpp
src/tests/TestAssertHandler.cpp
src/tests/TestChecks.cpp
src/tests/TestUnitTest++.cpp
src/tests/TestTest.cpp
src/tests/TestTestResults.cpp
src/tests/TestTestRunner.cpp
src/tests/TestCheckMacros.cpp
src/tests/TestTestList.cpp
src/tests/TestTestMacros.cpp
src/tests/TestTimeConstraint.cpp
src/tests/TestTimeConstraintMacro.cpp
src/tests/TestMemoryOutStream.cpp
src/tests/TestDeferredTestReporter.cpp
src/tests/TestXmlTestReporter.cpp
src/tests/TestCurrentTest.cpp
Linking TestUnitTest++...
ld: in libUnitTest++.a, archive has no table of contents
collect2: ld returned 1 exit status
make: *** [TestUnitTest++] Error 1
A co-worker doesn't get this error on his Mac, with the same version of gcc (4.2.1). (Note: I can use the libUnitTest++.a built by my co-worker, so I'm not blocked, but I would like to troubleshoot this problem nonetheless.)
I did a Google search, and it sounds like ranlib has solved others' similar problems, but libUnitTest++.a isn't getting created so I can't run ranlib on it.
I've run into this problem myself, you need to run ranlib on the .a file before passing it along to g++. I've patched this in a homebrew recipe, enjoy:
https://github.com/pdex/homebrew/blob/master/Library/Formula/unittest-cpp.rb