I was trying to install DMD so precisely followed the advices available on this page: http://dlang.org/dmd-osx.html. However, when I have an error when I try to build a .d file:
Here is my hello.d
import std.stdio;
void main() {
writeln("hello world!");
}
and then:
gcc hello.o -o hello -m64 -lphobos2 -lpthread -lm
ld: library not found for -lphobos2
clang: error: linker command failed with exit code 1 (use -v to see invocation)
--- errorlevel 1
Does anyone encountered the same issue?
Thanks,
Cédric
It seems that I did not precisely followed the advices on the dlang website. After some debugging time, I've found out the solution:
The dmd.conf file was incorrect, thus the libphobos2.a was not found. Now my dmd.conf file is looking like:
[Environment]
DFLAGS=-I%#P%/../src/phobos -I%#P%/../src/druntime/import -L-L%#P%/../osx/lib
Related
I have searched many times but didn't find any solution for xcode 11 while building ios app from my react native app.
Please suggest any solution.
ld: warning: directory not found for option '-L-L/Users/tanzeel/Library/Developer/Xcode/DerivedData/autodeals-famghlzaemprcbvrzxrehaeaqyk/Build/Products/Debug-iphoneos/AppAuth`
ld: library not found for -lAppAuth
clang: error: linker command failed with exit code -1 (use -v to see invocation)
I am seeing this exact error and noticed that the '-L-L/Users/...' looked odd because it should only be one -L.
I don't know the source yet, but when I looked at the complete compile command (it begins with /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -Xlinker -rpath -Xlinker /usr/lib/swift -target x86_64-apple-ios9.0-simulator -isysroot .....) I noticed that there was an empty '-L' in the command so that it said -L -L/Users/trflagg/Library/Developer/Xcode/DerivedData/...
Removing this from the command and running that command in the command line got me past this error.
UPDATE: Removing $(inherited) from the Library Search Paths seems to have worked. However, I don't know the implications of this.
UPDATE 2: Even better, you can just move $(inherited) to the bottom of your list of search paths. After figuring this out myself, I then found this answer: https://github.com/react-native-community/upgrade-support/issues/36#issuecomment-611516268
I have been following the instructions to install CalculiX and its dependencies as best as I could from the wiki page https://github.com/precice/calculix-adapter/wiki/Installation-instructions-for-CalculiX
I have already installed all the dependencies.
In the installation when I say make I get the following error:
gfortran -fopenmp -Wall -O3 -o bin/ccx_preCICE bin/ccx_2.15.o bin/ccx_2.15.a /home/prasad/SPOOLES.2.2//spooles.a -L/usr/local/lib -lprecice -lstdc++ -L/home/prasad/yaml-cpp-yaml-cpp-0.6.2//build -lyaml-cpp /home/prasad/ARPACK//libarpack_INTEL.a -lpthread -lm -lc
/home/prasad/ARPACK//libarpack_INTEL.a(second.o): In function `second_':
second.f:(.text+0x14): undefined reference to `etime_'
collect2: error: ld returned 1 exit status
Makefile:101: recipe for target 'bin/ccx_preCICE' failed
make: *** [bin/ccx_preCICE] Error 1
I tried changing the line 24 in ARPACK/UTIL/second.f to * EXTERNAL ETIME, but I am still getting the same error.
Can anyone tell me how to fix it?
Thank you in advance for the help.
Edit line 24 in ARPACK/UTIL/second.f
Append * to get
* EXTERNAL ETIME
If you get this error when you are building the adapter for CalculiX, go to ARPACK
make lib
Go back to the calculiX-adapter-master directory or the directory from where you were building CalculiX and its adapter
make clean
make
For detailed guide please check preCICE wiki for CalculiX adapter
I am currently trying to make and install a specialist suite of software (https://github.com/scottransom/presto), and am encountering this error:
gfortran -g -fPIC -o /path-to/presto/bin/psrorbit powerplot.o xyline.o psrorbit.o -L/usr/local/Cellar/cfitsio/3.450/lib -lcfitsio -lcurl -L/path-to/presto/lib -lpresto -L/usr/local/lib -lfftw3f -L/usr/local/lib/pgplot -lcpgplot -lpgplot -L/opt/X11/lib -lX11 -L/opt/X11/lib -lpng16 -lm
ld: mach-o string pool extends beyond end of file in /usr/local/lib/libcpgplot.dylib file '/usr/local/lib/libcpgplot.dylib' for architecture x86_64
collect2: error: ld returned 1 exit status
make: *** [psrorbit] Error 1
I don't think it's a problem related to PRESTO per se, as several searches (see this, this, and this) point to something fundamental, perhaps with Xcode. I currently have version 11.3, and I also installed the command line tools. So again, what does the error itself mean? Any help would be useful!
According to my reading of the source code for Apple's version of ld, this error means that the symbol table in an object prematurely ends when the file does.
There appear to be quite a few sanity checks performed on object files when linking. Likely, your copy of /usr/local/lib/libcpgplot.dylib is corrupt.
Currently trying to Makefile and encountered this error:
fatal error: NE10.h: No such file or directory
#include "NE10.h"
^~~~~~~~
compilation terminated
Am looking for the cause of this (is it related to the root directory?) and possible resolution of such an error?
Currently on a NVIDIA Xavier Arm Processor.
And
command -v g++
/usr/bin/g++
g++ --version
g++ (Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1) 7.4.0
Resolved this by doing an install of the NE10 package, then including in cmake/make process.
https://projectne10.github.io/Ne10/
Was missing the package on the whole, for anyone looking for this answer. Thanks!
Getting “ld: library not found for -llibopencv_dnn.3.3.1.dylib:
11:27:44: Running steps for project Hello_OpenCV...
11:27:44: Configuration unchanged, skipping qmake step.
11:27:44: Starting: "/usr/bin/make"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -stdlib=libc++ -headerpad_max_install_names -arch x86_64 -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -mmacosx-version-min=10.10 -Wl,-rpath,#executable_path/Frameworks -o Hello_OpenCV main.o -L/usr/local/lib -llibopencv_dnn.3.3.1.dylib -llibopencv_ml.3.3.1.dylib -llibopencv_objdetect.3.3.1.dylib -llibopencv_shape.3.3.1.dylib -llibopencv_stitching.3.3.1.dylib -llibopencv_superres.3.3.1.dylib -llibopencv_videostab.3.3.1.dylib -llibopencv_calib3d.3.3.1.dylib -llibopencv_features2d.3.3.1.dylib -llibopencv_highgui.3.3.1.dylib -llibopencv_videoio.3.3.1.dylib -llibopencv_imgcodecs.3.3.1.dylib -llibopencv_video.3.3.1.dylib -llibopencv_photo.3.3.1.dylib -llibopencv_imgproc.3.3.1.dylib -llibopencv_flann.3.3.1.dylib -llibopencv_core.3.3.1.dylib
ld: library not found for -llibopencv_dnn.3.3.1.dylib
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Hello_OpenCV] Error 1
11:27:44: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project Hello_OpenCV (kit: Desktop Qt 5.9.0 clang 64bit)
When executing step "Make"
11:27:44: Elapsed time: 00:00.
Do you actually have OpenCV installed on your system? If you run the following command, do you get any output?
find / -name "*libopencv*" 2>/dev/null
If not, you probably need to ensure you install it first. Follow instructions such as the ones found here.
If the above does return something (example: /path/to/lib/libopencv_dnn.3.3.1dylib), then try adding -L/path/to/lib into your compile line
It looks like you're including the entire suite of OpenCV modules, some of which are very feature-specific and likely not needed if you have a simple application. The DNN module in particular is not included in binary form with OpenCV (see this page on the matter). If you're sure you need it, you need to compile it yourself.
If you aren't doing any machine learning, you likely don't need the library and you can remove -llibopencv_dnn.3.3.1.dylib from your compile line.