When I try to get the fabric-sdk-go I get the following error:
$ go get github.com/hyperledger/fabric-sdk-go/pkg/fabric-client
# github.com/hyperledger/fabric-sdk-go/vendor/github.com/miekg/pkcs11
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lltdl
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lltdl
collect2.exe: error: ld returned 1 exit status
Does anyone have an idea what is the issue and how to resolve this?
The error message told us that the library libltdl which is required by github.com/miekg/pkcs11 is missing. Although you didn't mention it explicitly, I think you're using MSYS2 as the development environment. Do the following steps to install the missing library.
Search for the missing library, type pacman -Ss ltdl in MSYS2 terminal to get the exact package name. Here, ltdl is the keyword related to missing library which we got from error message. You should get something like:
msys/libltdl 2.4.6-2
A system independent dlopen wrapper for GNU libtool
From the result we know that the missing library is provided in libltdl package. It seems trivial, but sometimes a library may be provided by more than one package, e.g. a package which has prefix mingw-w64-i686-* for 32-bit system and the other with prefix mingw-w64-x86_64-* for 64-bit system.
Install the package by: pacman -S libltdl.
Reinstall the go package by: go get -v github.com/hyperledger/fabric-sdk-go/pkg/fabric-client.
Related
I'm trying to install the ivtools vector graphics editor (http://ivtools.sourceforge.net/ivtools/index.html) on macOS big sur. I'm trying to build it from source and I keep running into the issue below
ld: library not found for -lIV
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I'm not entirely sure what the -lIV library is and can't find anything easily online. If anyone has done this before on macOS I'd appreciate some pointers.
Thanks!
Not finding the libIV library probably means this library was not successfully built. If it had built successfully you would see these files:
./src/IV-common/DARWIN/libIV-common.dylib
./src/IV-common/DARWIN/libIV-common.2.0.4.dylib
./src/IV/DARWIN/libIV.2.0.4.dylib
./src/IV/DARWIN/libIV.dylib
If you can locate the error message in building libIV I can probably be of more help.
Usually when the linker doesn't find a library that actually exists in the path it's because some binary incompatibilities (i.e. about 32/64 bit).
In my situation it seems different and I didn't find a question that answer the issue.
Rapsberry Pi 3B+, Raspbian Stretch Lite, trying to compile the Microchip SDK for 3DTouchPad.
The compilation fails in this way:
mkdir -p build/bin
gcc -o build/bin/2draw build/2draw/2draw.o -Lbuild/bin -lmchp_hmi -L/lib/arm-linux-gnueabihf/ -lusb -Wl,-rpath,\$ORIGIN -lcurses
/usr/bin/ld: cannot find -lusb
collect2: error: ld returned 1 exit status
Makefile:125: recipe for target 'build/bin/2draw' failed
make: *** [build/bin/2draw] Error 1
and here the details about the "missing" library:
$ ldconfig -p | grep libusb
libusb-1.0.so.0 (libc6,hard-float) => /lib/arm-linux-gnueabihf/libusb-1.0.so.0
libusb-1.0.so (libc6,hard-float) => /usr/lib/arm-linux-gnueabihf/libusb-1.0.so
libusb-0.1.so.4 (libc6,hard-float) => /lib/arm-linux-gnueabihf/libusb-0.1.so.4
$ file /lib/arm-linux-gnueabihf/libusb-1.0.so.0.1.0
/lib/arm-linux-gnueabihf/libusb-1.0.so.0.1.0: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[sha1]=a93e56d2846806b7adc76e674493c76e54e3ca9e, stripped
That seems ok to me. I installed it with sudo apt-get install libusb-1.0-0-dev.
Are there any other causes that would prevent the linker to find an existing library?
EDIT
Interesting enough... even I cannot infer the cause.
$ ld -lusb --verbose
GNU ld (GNU Binutils for Raspbian) 2.28
Supported emulations:
armelf_linux_eabi
armelfb_linux_eabi
==================================================
attempt to open //usr/local/lib/arm-linux-gnueabihf/libusb.so failed
attempt to open //usr/local/lib/arm-linux-gnueabihf/libusb.a failed
attempt to open //lib/arm-linux-gnueabihf/libusb.so failed
attempt to open //lib/arm-linux-gnueabihf/libusb.a failed
attempt to open //usr/lib/arm-linux-gnueabihf/libusb.so failed
attempt to open //usr/lib/arm-linux-gnueabihf/libusb.a failed
attempt to open //usr/local/lib/libusb.so failed
attempt to open //usr/local/lib/libusb.a failed
attempt to open //lib/libusb.so failed
attempt to open //lib/libusb.a failed
attempt to open //usr/lib/libusb.so failed
attempt to open //usr/lib/libusb.a failed
attempt to open //usr/arm-linux-gnueabihf/lib/libusb.so failed
attempt to open //usr/arm-linux-gnueabihf/lib/libusb.a failed
ld: cannot find -lusb
For an argument of the form -lLIB, the link editor looks for input files named libLIB.so or libLIB.a. If there is a version number in the library name LIB, you must supply it, otherwise the link editor will not find it. If the version is in the soname after the .so, it is customary to add a dynamic link ending in .so without the version, so that the link editor can find it. (This symbolic link is usually packaged in the -dev or -devel packages by distributions.) But in your case, this symbolic link includes the version number before the .so (although it would not have to).
One advantage of putting the version number in the library name (the LIB part above) is that it is possible to easily switch between linking against different versions of the library.
I'm trying to use yo polymer for generate a new project scaffold, and in the process of installing the dependencies i get like 7 errors and all have these two lines.
ld: library not found for -lgcc_s.10.5
clang: error: linker command failed with exit code 1 (use -v to see invocation)
What library is -lgcc_s? Please some help here
yo polymer generated project include some dependency than need to compile for you platform, mostly image-min,this need three tools that write in no-js.You can remove these dependency from you package.json, then reinstall again.
You should paste more information about error.
The -lgcc_s error is tell you you don't have a full compiler env for dynamic compile dependency.
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/".
I'm new in Go. I want to use PortMidi wrapper for Go, trying to use this:
Go PortMidi
When using:
go get github.com/rakyll/portmidi
I've got:
/usr/bin/ld: $WORK/github.com/rakyll/portmidi/_obj/portmidi.cgo2.o: undefined reference to symbol 'Pt_Start'
/usr/lib/libporttime.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Tried to search something about:
DSO missing from command line
And:
undefined reference to symbol 'Pt_Start'
But found nothing.
Repaired it.
Installing libportmidi0 from official repo is bad idea. Need to compile it, for example from:
PortMIDI source download
All the instructions how to compile it in directory pm_linux.
The dynamic library of libportmidi is missing.
Try:
sudo apt-get install libportmidi0
That should fix it if you're on a debian/ubuntu system. If the library is not available on your linux system search your can still get the library source and compile it yourself.