Error building ace in solaris and linux - linux

I have issues building ace 5.3 in linux. I get the following error.
g++ -W -Wall -Wpointer-arith -pipe -O3 -g -Wno-uninitialized -fno-implicit-templates -DACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION -D_POSIX_THREADS -D_POSIX_THREAD_SAFE_FUNCTIONS -D_REENTRANT -I/home/vwickram/Ubuntu_Release/tmp/ACE_wrappers -DACE_HAS_EXCEPTIONS -L/home/vwickram/Ubuntu_Release/tmp/ACE_wrappers/ace -L./ -o gperf .obj/gperf.o .obj/Options.o .obj/Iterator.o .obj/Gen_Perf.o .obj/Key_List.o .obj/List_Node.o .obj/Hash_Table.o .obj/Bool_Array.o .obj/Vectors.o .obj/Version.o -lACE -ldl -lpthread
/home/vwickram/Ubuntu_Release/tmp/ACE_wrappers/ace/libACE.so: undefined reference to `aio_return'
/home/vwickram/Ubuntu_Release/tmp/ACE_wrappers/ace/libACE.so: undefined reference to `aio_read'
/home/vwickram/Ubuntu_Release/tmp/ACE_wrappers/ace/libACE.so: undefined reference to `aio_cancel'
/home/vwickram/Ubuntu_Release/tmp/ACE_wrappers/ace/libACE.so: undefined reference to `aio_error'
/home/vwickram/Ubuntu_Release/tmp/ACE_wrappers/ace/libACE.so: undefined reference to `aio_write'
/home/vwickram/Ubuntu_Release/tmp/ACE_wrappers/ace/libACE.so: undefined reference to `aio_suspend'
collect2: ld returned 1 exit status
make[2]: *** [gperf] Error 1
make[2]: Leaving directory `/home/vwickram/Ubuntu_Release/tmp/ACE_wrappers/apps/gperf/src'
make[1]: *** [src.subdir] Error 2
make[1]: Leaving directory `/home/vwickram/Ubuntu_Release/tmp/ACE_wrappers/apps/gperf'
make: *** [all.nested] Error 2
When I googled I found out it is a bug in ace5.3 and it is fixed in later versions. So I got the ace 6.3 version and managed to build in linux. However, ace 6.3 wouldn't build in SolarisX86 with sunstudio 11 compiler. I get the following.
ACE::Monitor_Control::Monitor_Point_Registry*ACE_Singleton<ACE::Monitor_Control::Monitor_Point_Registry,ACE_Thread_Mutex>::instance() /home/vwickram/Ubuntu_Release/ace6.3/tmp/ACE_wrappers/lib/libACE.so
ld: fatal: Symbol referencing errors. No output written to ace_gperf
gmake[1]: *** [ace_gperf] Error 1
gmake[1]: Leaving directory `/home/vwickram/Ubuntu_Release/ace6.3/tmp/ACE_wrappers/apps/gperf/src'
gmake: *** [gperf] Error 2
Could someone help please? I would still prefer using ace 5.3 version and use a patch to fix the bug and make it build on linux.

I faced a similar issue on ubuntu 14.04 for Ace 5.5.
I checked the whole console log and it couldnt find librt.so in /usr/lib and librt.so.1 in /lib/
I searched for these and found them in /usr/lib/x86_64-linux-gnu/librt.so and /lib/x86_64-linux-gnu/librt.so.1
I copied them to respected folders and then it worked fine without any errors.
On i386 librt is found in /usr/lib/i386-linux-gnu/librt.so

Install the asynchronous library.
For example in Fedora-linux it'll be libaio-devel. (Mostly not needed, but some issues may occur if not installed)
After Installing compile with the following flags.
cc file.c -lrt
-lrt - link (lrt)read time library.

Related

undefined reference to `crypt' : apache2 manually install error on imx8mqevk

I am using an iMX8MQ EVK board with Linux. I want to install the apache2 server and MySQL database from the source. Started installing apache2 using this
Here is the Linux version:
root#imx8mqevk:~# cat /etc/os-release
ID=fsl-imx-wayland
NAME="NXP i.MX Release Distro"
VERSION="5.10-hardknott (hardknott)"
VERSION_ID=5.10-hardknott
PRETTY_NAME="NXP i.MX Release Distro 5.10-hardknott (hardknott)"
Here is the output of configure
Facing issue with make as crypto is not found. I am not able to resolve the issue.
I have tried installing glibc but the issue is not resolved.
make error
Making all in support
make[1]: Entering directory '/home/root/httpd-2.4.53/support'
make[2]: Entering directory '/home/root/httpd-2.4.53/support'
/usr/local/apr/build-1/libtool --silent --mode=link gcc -g -O2 -pthread -o htpasswd htpasswd.lo passwd_common.lo /usr/local/apr/lib/libaprutil-1.la -lexpat /usr/local/apr/lib/libapr-1.la -lrt -lpthread -ldl
/usr/lib/gcc/aarch64-poky-linux/10.2.0/../../../../aarch64-poky-linux/bin/ld: passwd_common.o: in function `mkhash':
/home/root/httpd-2.4.53/support/passwd_common.c:228: undefined reference to `crypt'
/usr/lib/gcc/aarch64-poky-linux/10.2.0/../../../../aarch64-poky-linux/bin/ld: /home/root/httpd-2.4.53/support/passwd_common.c:240: undefined reference to `crypt'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:48: htpasswd] Error 1
make[2]: Leaving directory '/home/root/httpd-2.4.53/support'
make[1]: *** [/home/root/httpd-2.4.53/build/rules.mk:75: all-recursive] Error 1
make[1]: Leaving directory '/home/root/httpd-2.4.53/support'
make: *** [/home/root/httpd-2.4.53/build/rules.mk:75: all-recursive] Error 1

IBM gpfs 4.2.1 compile error

I encountered the following error while I was compiling gpfs.
OS:RHEL7.4
GPFS:4.2.1
1.# cd /usr/lpp/mmfs/src/
2.# make LINUX_DISTRIBUTION=REDHAT_AS_LINUX Autoconfig
3.# make World
When the third step occurs, the following error occurs。
DVERBOSETRACE -DLROC -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR()" -fno-stack-protector -Wformat=0 -Wno-format-security -I/usr/lpp/mmfs/src/gpl-linux -c kdump.c
cc kdump.o kdump-kern.o kdump-kern-dwarfs.o -o kdump -lpthread
kdump-kern.o: In function `GetOffset':
kdump-kern.c:(.text+0x9): undefined reference to `page_offset_base'
kdump-kern.o: In function `KernInit':
kdump-kern.c:(.text+0x58): undefined reference to `page_offset_base'
collect2: error: ld returned 1 exit status
make[1]: *** [modules] Error 1
make[1]: Leaving directory `/usr/lpp/mmfs/src/gpl-linux'
make: *** [Modules] Error 1
add unsigned long page_offset_base; on top of the file /usr/lpp/mmfs/src/gpl-linux/kdump.c
i see the same problem compiling with the kernel (3.10.0-693.1.1.el7.x86_64). (rhel7.3 updated + GPFS 4.2.3-1)
I resolved it using a previous kernel: kernel-3.10.0-514.el7.x86_64
I hope this help.
Regards

Problems with PySide installation

I have python2.7.9 on my new Xubuntu installation, albeit it's 14.04.
PySide installation stuck with Shiboken
Linking CXX shared library libshiboken-python2.7.so
/usr/bin/ld: /usr/local/lib/libpython2.7.a(abstract.o): relocation R_X86_64_32S against `_Py_NotImplementedStruct' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libpython2.7.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [libshiboken/libshiboken-python2.7.so.1.2.2] Error 1
make[1]: *** [libshiboken/CMakeFiles/libshiboken.dir/all] Error 2
make: *** [all] Error 2
error: Error compiling shiboken
After some "googling" I concluded that the problem could be solved with add --enable-shared at ./configure options.
Following docs tried to installed Shiboken in several ways, but after failed, tried to find configure in source files which I couldn't.
Please help. Thank you.
The output is showing that it's trying to link against a static python library, rather than a shared one - i.e. libpython2.7.a, rather than libpython2.7.so.
Thus, it's python that needs to be re-compiled with --enable-shared, not shiboken.

Compiling AR Drone SDK fails with DSO missing from command line

I am attempting to build the AR Drone SDK on Ubuntu. When compiling the libraries I get the error:
//lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
I dont understand what the problem is. I am following this tutorial and the problem occurs when I run make. I have run ARDroneLib/Soft/Build/check_dependencies.sh and it outputs ok.
Any ideas what the problem is? Below is the full output from running make.
soribo#soribo-vm:~/Projects/ARDrone/ARDrone_SDK_2_0_1/Examples/Linux$ make
make[1]: Entering directory `/home/soribo/Projects/ARDrone/ARDrone_SDK_2_0_1/ARDroneLib/Soft/Build'
Libs already extracted
Building target static
Architecture x86_64 is already built
Creating universal static lib file from architectures x86_64
Build done.
Checking required Ubuntu packages ...
ok.
Building ARDroneTool/Lib
Building ARDroneTool/Lib
make[1]: Leaving directory `/home/soribo/Projects/ARDrone/ARDrone_SDK_2_0_1/ARDroneLib/Soft/Build'
make[1]: Entering directory `/home/soribo/Projects/ARDrone/ARDrone_SDK_2_0_1/Examples/Linux/Navigation/Build'
-- Building ardrone_navigation --
Libs already extracted
Building target static
Architecture x86_64 is already built
Creating universal static lib file from architectures x86_64
Build done.
Checking required Ubuntu packages ...
ok.
Building ARDroneTool/Lib
Building ARDroneTool/Lib
-- Linking ardrone_navigation --
ld common/mobile_main
/usr/bin/ld: ../../Soft/Build/targets_versions/ffmpeg_static_PROD_MODE_Linux_3.19.0-25-generic_GNU_Linux_usrbingcc_4.8.4/libavutil.a(eval.o): undefined reference to symbol 'fabs##GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[4]: *** [/home/soribo/Projects/ARDrone/ARDrone_SDK_2_0_1/Examples/Linux/Navigation/Build/../../Build/Release/common/mobile_main] Error 1
make[3]: *** [all] Error 2
make[2]: *** [build_app] Error 2
make[1]: *** [ardrone_navigation] Error 2
make[1]: Leaving directory `/home/soribo/Projects/ARDrone/ARDrone_SDK_2_0_1/Examples/Linux/Navigation/Build'
make: *** [all] Error 2
I had the same problem. I found the solution here:
http://jderobot.org/Varribas-tfm/ARDrone:starting_up#Building_Examples
Looking for undefined reference to symbol 'fabs##GLIBC_2.2.5', I reached to [2], that confirms an unmeet dependency problem [1].
What happened here?
libavutil.a(eval.o): undefined reference to symbol 'fabs##GLIBC_2.2.5'
libm.so.6: error adding symbols: DSO missing from command line
First line say us that libavutil is using fabs. It is declared into libm library, but -lm is missed in command line (Makefile).
ARDrone_SDK_2_0_1/Examples/Linux/Navigation/Build/Makefile:131
GENERIC_LIBS+=-liw -lpc_ardrone -lgthread-2.0 -lgtk-x11-2.0 -lrt -lxml2 -ludev -lswscale -lSDL -lm
Then, Navigation will compile successfully.

Clang on Raspberry Pi/Raspbian Error?

When I try to run clang as my C compiler I get an error (I think a linker error)
Compilation started at Sun Nov 11 14:34:55
make -k
clang -std=c99 -ggdb -o0 -Wall -Werror helloworld.c -o helloworld
clang: warning: unknown platform, assuming -mfloat-abi=soft
/usr/bin/ld: cannot find crt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [helloworld] Error 1
Compilation exited abnormally with code 2 at Sun Nov 11 14:34:56
I actually re-installed the Raspbian image thinking that the problem would go away but it persists. Raspbian version is the latest Raspbian Wheezy hard float ABI (2012-10-28).
As you've essentially figured out, the installed clang is unusably broken. If you installed this through a package manager, complain to whoever distributes the package, because they clearly didn't bother testing it.

Resources