I am getting the following libudev undefined reference errors while cross compiling to arm.
build_arm/lib//libCoreUtils.so: undefined reference to `udev_monitor_unref'
build_arm/lib//libCoreUtils.so: undefined reference to `udev_enumerate_scan_devices'
build_arm/lib//libCoreUtils.so: undefined reference to `udev_new'
build_arm/lib//libCoreUtils.so: undefined reference to `udev_list_entry_get_name'
...
I am using -ludev but also getting same error.
Can any anyone help me?
Related
I am trying to build an old program using IDL6.2 in CentOS7, which was originally built for RHEL3 and runs in RHEL5.
However, when I try to make it in CentOS7, I get the error bellow.
May that be an compatibility problem? How can I solve it?
Thanks!
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib/crt1.o: In function `_start':
(.text+0x18): undefined reference to `main'
XXX.o: In function `XXX(std::string const&)':
XXX.h:204: undefined reference to `IDL_Message'
XXX.o: In function `XXX(int, IDL_VARIABLE**)':
XXX.cpp:217: undefined reference to `IDL_MessageVE_REQSTR'
XXX.cpp:218: undefined reference to `IDL_MessageVE_REQSTR'
XXX.cpp:271: undefined reference to `IDL_GettmpInt'
Found the root of the problem! Incompatibility of Automake between the versions 1.9 (in RHEL5) and 1.13 in (CentOS7).
I am currently patching a older version of OpenSSL to the latest stable 1.0.0o build (via import_openssl.sh)for use with a Android application via the NDK r10c.
While building the libssl.so sharedlibrary i am presented with the following errors.
[armeabi] SharedLibrary : libssl.so
jni/openssl/ssl/s3_enc.c:542: error: undefined reference to 'ssl3_cbc_remove_padding'
jni/openssl/ssl/s3_enc.c:739: error: undefined reference to 'ssl3_cbc_record_digest_supported'
jni/openssl/ssl/s3_enc.c:764: error: undefined reference to 'ssl3_cbc_digest_record'
jni/openssl/ssl/s3_pkt.c:464: error: undefined reference to 'ssl3_cbc_copy_mac'
jni/openssl/ssl/t1_enc.c:763: error: undefined reference to 'tls1_cbc_remove_padding'
jni/openssl/ssl/t1_enc.c:919: error: undefined reference to 'ssl3_cbc_record_digest_supported'
jni/openssl/ssl/t1_enc.c:925: error: undefined reference to 'ssl3_cbc_digest_record'
jni/openssl/ssl/ssl_lib.c:1058: error: undefined reference to 'dtls1_min_mtu'
Taking the first error for example, i can see a reference in the file s3_enc.c (https://github.com/openssl/openssl/blob/OpenSSL_1_0_0-stable/ssl/s3_enc.c) to a function 'ssl3_cbc_remove_padding' but the actual function is nowhere to be seen, only a prototype in ssl_locl.h (https://github.com/openssl/openssl/blob/OpenSSL_1_0_0-stable/ssl/ssl_lib.c) so i am a little confused.
Any help or previous experience would be greatly appreciated in order to get these errors cleared. if you need me to elaborate further, please ask.
Check the files (s3_enc.c, t1_enc.c, ssl_lib.c), included in their respective .mk files or not. In my case it was not included so I just add these source files in ssl/Android.mk under LOCAL_SRC_FILES section.
I want to run a project that communicates with a USB device using libusb. I already have it on Linux, and it works great there, so I want to run it on Windows with Cygwin. I installed libusb for Windows and libusb in Cygwin, then tried to compile it. It turns out that you need pciutils, unlike on Linux in which it's really easy to get it. In Cygwin it's a problem.
After overcoming some difficulties I managed to get further with my purpose of compiling pciutil in the Cygwin environment. I follwed these steps:
Download winio package for Windows and went to Winio\Binaries and copied winio32.dll and winio32.sys to the pciutil directory.
Copy config.h/mk from ../win32 to ../lib
Go to ..\lib\i386-io-winodws.h and change line 39 to "lib = LoadLibrary("WinIo32.dll");"
$ make
The make step didn't work. It showed me a makefile error, so I tried to play with it without any luck.
I got this error:
gcc lspci.o ls-vpd.o ls-caps.o ls-ecaps.o ls-kernel.o ls-tree.o ls-map.o common.o lib/libpci.a -o lspci
lib/libpci.a(i386-ports.o):i386-ports.c:(.text+0x95): undefined reference to `_outpd'
lib/libpci.a(i386-ports.o):i386-ports.c:(.text+0xd3): undefined reference to `_outpd'
lib/libpci.a(i386-ports.o):i386-ports.c:(.text+0xf1): undefined reference to `_outpw'
lib/libpci.a(i386-ports.o):i386-ports.c:(.text+0x110): undefined reference to `_outp'
lib/libpci.a(i386-ports.o):i386-ports.c:(.text+0x170): undefined reference to `_outp'
lib/libpci.a(i386-ports.o):i386-ports.c:(.text+0x184): undefined reference to `_outp'
lib/libpci.a(i386-ports.o):i386-ports.c:(.text+0x1af): undefined reference to `_outp'
lib/libpci.a(i386-ports.o):i386-ports.c:(.text+0x204): undefined reference to `_outpw'
lib/libpci.a(i386-ports.o):i386-ports.c:(.text+0x218): undefined reference to `_outp'
lib/libpci.a(i386-ports.o):i386-ports.c:(.text+0x242): undefined reference to `_outp'
lib/libpci.a(i386-ports.o):i386-ports.c:(.text+0x259): undefined reference to `_outpd'
lib/libpci.a(i386-ports.o):i386-ports.c:(.text+0x2d5): undefined reference to `_outpd'
lib/libpci.a(i386-ports.o):i386-ports.c:(.text+0x30c): undefined reference to `_inpd'
lib/libpci.a(i386-ports.o):i386-ports.c:(.text+0x328): undefined reference to `_inpw'
lib/libpci.a(i386-ports.o):i386-ports.c:(.text+0x348): undefined reference to `_inp'
lib/libpci.a(i386-ports.o):i386-ports.c:(.text+0x3b2): undefined reference to `_outp'
lib/libpci.a(i386-ports.o):i386-ports.c:(.text+0x3c6): undefined reference to `_outp'
lib/libpci.a(i386-ports.o):i386-ports.c:(.text+0x3ed): undefined reference to `_outp'
lib/libpci.a(i386-ports.o):i386-ports.c:(.text+0x417): undefined reference to `_inpw'
lib/libpci.a(i386-ports.o):i386-ports.c:(.text+0x42f): undefined reference to `_outp'
lib/libpci.a(i386-ports.o):i386-ports.c:(.text+0x447): undefined reference to `_inp'
lib/libpci.a(i386-ports.o):i386-ports.c:(.text+0x457): undefined reference to `_inpd'
lib/libpci.a(i386-ports.o):i386-ports.c:(.text+0x65a): undefined reference to `_outp'
lib/libpci.a(i386-ports.o):i386-ports.c:(.text+0x666): undefined reference to `_inpd'
lib/libpci.a(i386-ports.o):i386-ports.c:(.text+0x67c): undefined reference to `_outpd'
lib/libpci.a(i386-ports.o):i386-ports.c:(.text+0x688): undefined reference to `_inpd'
lib/libpci.a(i386-ports.o):i386-ports.c:(.text+0x69f): undefined reference to `_outpd'
lib/libpci.a(i386-ports.o):i386-ports.c:(.text+0x6c3): undefined reference to `_outpd'
lib/libpci.a(i386-ports.o):i386-ports.c:(.text+0x729): undefined reference to `_outp'
lib/libpci.a(i386-ports.o):i386-ports.c:(.text+0x73d): undefined reference to `_outp'
lib/libpci.a(i386-ports.o):i386-ports.c:(.text+0x751): undefined reference to `_outp'
lib/libpci.a(i386-ports.o):i386-ports.c:(.text+0x75d): undefined reference to `_inp'
lib/libpci.a(i386-ports.o):i386-ports.c:(.text+0x778): undefined reference to `_inp'
collect2: error: ld returned 1 exit status
Makefile:96: recipe for target 'lspci' failed
make: *** [lspci] Error 1
I went to the Makefile, line 96, but I didn't understand what to change there in order to make it work (if you like, I could post the entire makefile too):
%: %.o
$(CC) $(LDFLAGS) $(TARGET_ARCH) $^ $(LDLIBS) -o $#
Since you're using a 32-bit version of Windows you can use the Cygwin port of pciutils. The files in the win32 subdirectory are actually for the MinGW port, and that's why you get the link errors.
The first thing you should do unpack the source files to a new directory so you can start from fresh. Your changes and modifications aren't necessary to compile it using Cygwin. Be sure not to copy any of the files in the win32 directory this time, they're not needed. Also don't copy the winio32 files, you don't need them either. Don't make any changes to any of the files.
The next thing to do is to install the ioperm package using Cygwin's setup-x86.exe. Type ioperm in the search box to quickly find it amongst all the other packages. Once it's been installed run ioperm -i from the Cygwin prompt to install the driver that allows applications to do direct I/O.
Next change directory to where you unpacked the fresh copy of pciutils and run the following command from the Cygwin shell:
make HOST=i386-pc-cygwin
That should be all you need to do to create the library and utilities.
I am trying to cross compile libxml2 for android , since libxml need icu4c headers , Downloaded from the link https://github.com/android/platform_external_icu4c and included the unicode headers and tried to compiled using ndk-build,,.
But got the below errors .
obj/local/armeabi/objs/xsml2/encoding.o: In function `xmlUconvWrapper':
jni/encoding.c:1870: undefined reference to `ucnv_convertEx'
jni/encoding.c:1865: undefined reference to `ucnv_convertEx'
obj/local/armeabi/objs/xsml2/encoding.o: In function `closeIcuConverter':
jni/encoding.c:141: undefined reference to `ucnv_close'
jni/encoding.c:142: undefined reference to `ucnv_close'
obj/local/armeabi/objs/xsml2/encoding.o: In function `openIcuConverter':
jni/encoding.c:109: undefined reference to `ucnv_open'
jni/encoding.c:119: undefined reference to `ucnv_setFromUCallBack'
jni/encoding.c:126: undefined reference to `ucnv_open'
jni/encoding.c:132: undefined reference to `ucnv_close'
jni/encoding.c:115: undefined reference to `ucnv_setToUCallBack'
jni/encoding.c:115: undefined reference to `UCNV_FROM_U_CALLBACK_STOP'
jni/encoding.c:115: undefined reference to `UCNV_TO_U_CALLBACK_STOP'
For this errors I included the -L/Android/android-ndk-r8/external/libs -licui18n -licuuc in Android make file but I get the above errors .
Can some body suggests which version of icu4c libs has all these functions .
My final goal is to compile libxml2 for android .
Pls somebody through some light to proceed further .
I am trying to compile the OPENMP fortran code on linux. I have around 230 subroutines. The code I used to compile the code is as follows:
1) At first I compiled each subroutine with the following command
ifort -c -override-limits -openmp *.for
Then all the subroutines have now a separate object file.
2) Then I tried to compile the object files to the executable by the following command
ifort *.o -o myprogram
I got the following error :
WINDWAVE.F90:(.text+0x1c9d): undefined reference to `__kmpc_global_thread_num'
WINDWAVE.F90:(.text+0x1cb0): undefined reference to `__kmpc_ok_to_fork'
WINDWAVE.F90:(.text+0x1eea): undefined reference to `__kmpc_fork_call'
WINDWAVE.F90:(.text+0x1f09): undefined reference to `__kmpc_serialized_parallel'
WINDWAVE.F90:(.text+0x214b): undefined reference to `__kmpc_end_serialized_parallel'
WINDWAVE.F90:(.text+0x2427): undefined reference to `__kmpc_for_static_init_4'
WINDWAVE.F90:(.text+0x29c7): undefined reference to `__kmpc_for_static_fini'
WINDWAVE.F90:(.text+0x29da): undefined reference to `__kmpc_barrier'
WINDWAVE.F90:(.text+0x2a50): undefined reference to `__kmpc_for_static_init_4'
WINDWAVE.F90:(.text+0x3773): undefined reference to `__kmpc_for_static_fini'
WINDWAVE.F90:(.text+0x3786): undefined reference to `__kmpc_barrier'
WINDWAVE.F90:(.text+0x37fc): undefined reference to `__kmpc_for_static_init_4'
WINDWAVE.F90:(.text+0x4a58): undefined reference to `__kmpc_for_static_fini'
WINDWAVE.F90:(.text+0x4a6b): undefined reference to `__kmpc_barrier'
WINDWAVE.F90:(.text+0x4a8f): undefined reference to `__kmpc_single'
WINDWAVE.F90:(.text+0x4d18): undefined reference to `__kmpc_end_single'
WINDWAVE.F90:(.text+0x4d2b): undefined reference to `__kmpc_barrier'
WINDWAVE.F90:(.text+0x4da9): undefined reference to `__kmpc_for_static_init_4'
WINDWAVE.F90:(.text+0x4fc5): undefined reference to `__kmpc_for_static_fini'
WINDWAVE.F90:(.text+0x4fd8): undefined reference to `__kmpc_barrier'
WINDWAVE.F90:(.text+0x504e): undefined reference to `__kmpc_for_static_init_4'
WINDWAVE.F90:(.text+0x596f): undefined reference to `__kmpc_for_static_fini'
WINDWAVE.F90:(.text+0x5982): undefined reference to `__kmpc_barrier'
WINDWAVE.F90:(.text+0x59fb): undefined reference to `__kmpc_for_static_init_4'
WINDWAVE.F90:(.text+0x6369): undefined reference to `__kmpc_for_static_fini'
WINDWAVE.F90:(.text+0x637c): undefined reference to `__kmpc_barrier'
WINDWAVE.F90:(.text+0x63f2): undefined reference to `__kmpc_for_static_init_4'
WINDWAVE.F90:(.text+0x6b8d): undefined reference to `__kmpc_for_static_fini'
WINDWAVE.F90:(.text+0x6ba0): undefined reference to `__kmpc_barrier'
WINDWAVE.o: In function `windwave_mp_fetch_':
WINDWAVE.F90:(.text+0x9cfd): undefined reference to `__kmpc_global_thread_num'
WINDWAVE.F90:(.text+0x9d10): undefined reference to `__kmpc_ok_to_fork'
WINDWAVE.F90:(.text+0x9da0): undefined reference to `__kmpc_fork_call'
WINDWAVE.F90:(.text+0x9dbc): undefined reference to `__kmpc_serialized_parallel'
WINDWAVE.F90:(.text+0x9e59): undefined reference to `__kmpc_end_serialized_parallel'
WINDWAVE.F90:(.text+0xa0ea): undefined reference to `__kmpc_for_static_init_4'
WINDWAVE.F90:(.text+0xa109): undefined reference to `__kmpc_for_static_fini'
WINDWAVE.F90:(.text+0xa118): undefined reference to `__kmpc_barrier'
I am using intel 13 composer to compile the program. I didn't know how to use link with libiomp5md .
Please help me get rid of this error. I tried several times but I couldn't get this error.
If I don't use the openmp flag the program runs but it doesn't treat as openmp program.
Thanks
Jdbaba
A quick scan of the Intel forums suggests you may need the -openmp option on the second command as well, to cause it to link against the OpenMP libraries.
You could have found this yourself by Googling __kmpc_global_thread_num
I've the same problem and after searching , someone suggested this method, worked for me. Just add this option when calling ifort:
-openmp -fpp -auto
the problem may be caused by not linked to mp library.