LLVM runs into a linker error after upgrade - macos

I have a Haskell stack project where I have been using the llvm-hs library for building a compiler which emits LLVM IR. I had been working with LLVM version 8.0.0 so far. Recently due to a Python upgrade in my system the LLVM version got bumped to 8.0.1.
When I attempt to do stack build I get the following error -
ld: warning: directory not found for option '-L/usr/local/Cellar/llvm-8/8.0.0/lib/llvm-8/lib'
ld: library not found for -lLLVM-8
clang: error: linker command failed with exit code 1 (use -v to see invocation)
`gcc' failed in phase `Linker'. (Exit code: 1)
It seems from the above that ld is looking for -L/usr/local/Cellar/llvm-8/8.0.0/lib/llvm-8/lib whereas on my system I currently have the version for 8.0.1. How do I point ld to the correct path?
I am running MacOS Mojave. stack version 2.3.1. Thanks

I was capable of solving this by adding the following to my .bash_profile
export LIBRARY_PATH="$LIBRARY_PATH:/usr/local/Cellar/llvm-8/8.0.1/lib/llvm-8/lib"
Hope this helps if someone ran into the same problem.

Related

CMake generate Xcode project :ld: library not found for -lQuadProgpp

My CMake project works well independently in terminal. However, when I use CMake generate Xcode project. I cannot build the project.
It says:
ld: library not found for -lQuadProgpp clang: error: linker command
failed with exit code 1 (use -v to see invocation)
Who can tell me what the problem is? And how to fix this problem?
Thanks

ld: framework not found ModelIO for architecture x86_64 when compiling my app

I was moving a small number of Cocoapods dependencies' source files into the project, and when I tried to compile my project I got the error:
ld: framework not found ModelIO for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
What does this mean? ModelIO is not mentioned anywhere in my project, and my linked frameworks do not mention it either.
I got this error message after adding SupportKit to my Podfile. Per the SupportKit release notes, they require Xcode 7 as of 2.10.1 and trying to use it while still on 6.x can produce this error: https://github.com/radialpoint/SupportKit/issues/54.

Configuring wxWidgets for OS X 10.10

I am trying to build a program that relies on wxWidgets to run properly. I have the latest version of Xcode installed. I have tried building wxWidgets (both wxWidgets-3.0.2 and wxWidgets-2.9.4, the version originally used by the main program). However, in both cases, running the makefile for the main program gives the following error:
make: /Users/path to wxWidgets/wxWidgets-2.9.4/build-cocoa-release/utils/wxrc/wxrc: No such file or directory
As I understand it, I need to build wxrc to get my main program to build properly (I have tried this, but apparently some header files are missing). Is there any way to configure wxWidgets before this step that will automatically build wxrc as well? Or is that something I need to build separately? If it is separate, how would that be done?
I've pasted the code I originally used to configure wxWidgets below, with line breaks to make it easier to read:
../configure --with-osx_cocoa --with-macosx-version-min=10.7
--with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk
--prefix="$(pwd)" --with-opengl CC=clang CXX=clang++ CXXFLAGS="-stdlib=libc++ -std=c++11"
OBJCXXFLAGS="-stdlib=libc++ -std=c++11" LDFLAGS=-stdlib=libc++
There is one error while building wxWidgets:
../src/osx/cocoa/utils.mm:250:28: error: cannot initialize a parameter of type 'id' with an lvalue of type
'wxNSAppController *'
[NSApp setDelegate:appcontroller];
When I go into the samples directory and enter "make", I get: ld: library not found for -lwx_osx_cocoau_xrc-2.9 clang: error: linker command failed with exit code 1 (use -v to see invocation) When entering "make" in demos, I get: ld: library not found for -lwx_osx_cocoau_core-2.9 clang: error: linker command failed with exit code 1 (use -v to see invocation)
If I missed any steps I should have taken before these (something with Xcode maybe?) please let me know. Thank you very much in advance.
Similar question. I have sugested a workaround proposed on a forum as follows: you can use --with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/".

Installing openmpi on OS/X: clang error: library -lgomp not found

I'm aiming to install openmpi 1.6.5 on my Macbook Pro, mountainlion 10.8.5, by following the straightforward guidelines at:
https://wiki.helsinki.fi/display/HUGG/Installing+Open+MPI+on+Mac+OS+X
While configuring with
./configure --prefix=/usr/local/bin F77=gfortran FC=gfortran
is successful, "make all" fails with:
clang: warning: argument unused during compilation: '-fopenmp'
CXXLD vtfilter
ld: library not found for -lgomp
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[7]: *** [vtfilter] Error 1
As a complete newbie, I'm stuck on this error... I read about it error here:
Error enabling openmp - "ld: library not found for -lgomp" and Clang errors
(sorry for the new thread on possibly the same issue--this website's instructions guided me to not post a new question as an answer to an old thread...)
I'm not sure if these fixes apply here (?)-- I've tried the ordering within $PATH, which had no effect. Does this look like I have an issue with my compilers? If there is more useful information I can post, please let me know.
Thank you for your time and help!
It would be much easier if you simply disable building of the bundled VampirTrace library:
$ ./configure --enable-contrib-no-build=vt ...
If you still need to trace and profile your MPI applications, you could download VampirTrace and build it separately.

PJSIP Build error - Library is not found

I am following through this link http://trac.pjsip.org/repos/wiki/Getting-Started/iPhone#BuildingPJSIP .
I am using Mac OsX 10.9.2, xcode 5.1.1, ios sdk 7.1, please correct me.
ld: library not found for -lmilenage-arm-apple-darwin9
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Thanks in advance.

Resources