llvm/clang compile error with Memory exhausted - clang

I am trying to build the latest llvm/clang code on my ubuntu 14.04 vm, which has 2GB memory.
What I did is a normal configure/make procedure, without any parameters to these two commands.
at last, I have the following error:
llvm[4]: Linking Debug+Asserts executable clang
/usr/bin/ld: failed to set dynamic section sizes: Memory exhausted
collect2: error: ld returned 1 exit status
make[4]: *** [/home/alex/Downloads/llvm_build/Debug+Asserts/bin/clang] Error 1
make[4]: Leaving directory /home/alex/Downloads/llvm_build/tools/clang/tools/driver'
make[3]: *** [driver/.makeall] Error 2
make[3]: Leaving directory/home/alex/Downloads/llvm_build/tools/clang/tools'
make[2]: * [all] Error 1
make[2]: Leaving directory /home/alex/Downloads/llvm_build/tools/clang'
make[1]: *** [clang/.makeall] Error 2
make[1]: Leaving directory/home/alex/Downloads/llvm_build/tools'
make: *** [all] Error 1
Does anyone know how to resolve this?

You need to do one of the following:
Add more RAM to your VM, or
Use gold instead of ld as a linker, or
Build Release(-DCMAKE_BUILD_TYPE=Release), not Debug build

Another consideration: If you have Make running parallel jobs (e.g., make -j8), the concurrently executing jobs may require too much memory.

Related

Docker NodeMCU ESP32 recipe for target 'build' failed

On OSX 10.13.6 I get the following failure in an ESP32 build using marcelstoer/docker-nodemcu-build:
make[3]: *** No rule to make target '/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h', needed by '/opt/nodemcu-firmware/build/luac_cross/uzlib_deflate.d'. Stop.
make[3]: Leaving directory '/opt/nodemcu-firmware/build/luac_cross'
/opt/nodemcu-firmware/components/luac_cross/component.mk:5: recipe for target 'build' failed
make[2]: *** [build] Error 2
make[2]: Leaving directory '/opt/nodemcu-firmware/build/luac_cross'
/opt/nodemcu-firmware/sdk/esp32-esp-idf/make/project.mk:552: recipe for target 'component-luac_cross-build' failed
make[1]: *** [component-luac_cross-build] Error 2
make[1]: Leaving directory '/opt/nodemcu-firmware'
Makefile:18: recipe for target 'all' failed
make: *** [all] Error 2`
Anyone got any suggestions?
Not the answer you were looking for but...
This appears to be a known issue. At https://github.com/nodemcu/nodemcu-firmware/issues/2779 a few people are discussing an issue that looks a lot like yours.

Compiling ROS Kinetec from source fails when building opencv

I'm using an Arch machine and trying to compile ROS desktop full from source. The build fails when image_proc is trying to link executable.
Here is the error log:
[ 23%] Built target image_proc_gencfg
[ 84%] Built target image_proc
[ 92%] Linking CXX executable /home/alphayed/ROS/ros_catkin_ws/devel_isolated/image_proc/lib/image_proc/image_proc
/home/alphayed/ROS/ros_catkin_ws/install_isolated/lib/libopencv_viz3.so.3.1.0: undefined reference to `vtkSTLReader::New()'
/home/alphayed/ROS/ros_catkin_ws/install_isolated/lib/libopencv_viz3.so.3.1.0: undefined reference to `vtkOBJReader::New()'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/image_proc_exe.dir/build.make:219: /home/alphayed/ROS/ros_catkin_ws/devel_isolated/image_proc/lib/image_proc/image_proc] Error 1
make[1]: *** [CMakeFiles/Makefile2:68: CMakeFiles/image_proc_exe.dir/all] Error 2
make: *** [Makefile:139: all] Error 2
I think the problem is related to opencv3. I removed it from the system and recompiled it from source but that didn't solve the issue. Can you please help?
I have found a fix as per this thread. You need to modify opencv3/cmake/OpenCVDetectVTK.cmake, for every find_package(VTK QUIET COMPONENTS ... add an entry vtkIOGeometry

Wireshark make error: undefined reference to symbol 'g_module_name'

I'm trying to compile wireshark-P2P-1.7.0 but it fails showing the following error:
/usr/bin/ld: gtk/libui.a(libui_a-plugins_dlg.o): undefined reference to symbol 'g_module_name'
//usr/lib/i386-linux-gnu/libgmodule-2.0.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [wireshark] Error 1
make[2]: Leaving directory `/home/sniffer/Desktop/P2P_install/Sigma_Sniffer-P2P-Ubuntu_v8.1.0/wireshark-P2P-1.7.0'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/sniffer/Desktop/P2P_install/Sigma_Sniffer-P2P-Ubuntu_v8.1.0/wireshark-P2P-1.7.0'
make: *** [all] Error 2
I'm not sure if it requires special libraries to run on a 64bit processor since this version of wireshark is 32 bit.
I cannot use a standard version of wireshark or download it from anywhere else. I have to use this one because is specially configure to make WFA tests.
Thank you!!
Oscar.
The only way a source code version of Wireshark would "[be] 32 bit" would be if somebody had added code to it that assumed that long or pointer data types were 32-bit; no code in the Wireshark source from wireshark.org is "32 bit" or "64 bit", it's all portable (and the Wireshark build infrastructure builds and tests both 32-bit and 64-bit versions).
What it does need is a version of GLib that includes g_module_name(), and you need to be linking with GLib (Wireshark uses it).

I cannot obtain the rpm of ContextBroker

I have tried to obtain the rpm associated to ContextBroker component (https://github.com/telefonicaid/fiware-orion.git) but I have obtained the following error after executing make rpm.
[ 98%] Building CXX object src/lib/mongoBackend/CMakeFiles/mongoBackend.dir/mongoNotifyContextAvailability.cpp.o
Linking CXX static library libmongoBackend.a
make[4]: Leaving directory `/home/develenv/app/jenkins/config-history/jobs/ContextBroker-Build/fiware-orion/rpm/BUILD/contextBroker-0.14.1_next/BUILD_RELEASE'
[ 98%] Built target mongoBackend
make[3]: Leaving directory `/home/develenv/app/jenkins/config-history/jobs/ContextBroker-Build/fiware-orion/rpm/BUILD/contextBroker-0.14.1_next/BUILD_RELEASE'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/develenv/app/jenkins/config-history/jobs/ContextBroker-Build/fiware-orion/rpm/BUILD/contextBroker-0.14.1_next/BUILD_RELEASE'
make[1]: *** [release] Error 2
make[1]: Leaving directory `/home/develenv/app/jenkins/config-history/jobs/ContextBroker-Build/fiware-orion/rpm/BUILD/contextBroker-0.14.1_next'
error: Bad exit status from /var/tmp/rpm-tmp.NPtnCN (%build)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.NPtnCN (%build)
make: *** [rpm] Error 1
Previously to this stage I compiled and executed the unit tests as well as functional tests with no problems I am working on Red Hat 4.4.7-3 with repo/branch:
https://github.com/telefonicaid/fiware-orion/tree/release/iotplatform-v1
Thanks for your help
UPDATE:
The linux distribution used was CentOS 6.4
This problems is solved if you install cantcoap and COAP client, as described in the Orion README.md file, then execute make rpm.
Note that although COAP stuff is optional to build the code itself with make release or make debug the RPM building target needs them by the time being (we probably fix this in the future).
UPDATE: the fix of the RPM makefile target is being dealed at this Github.com issue: https://github.com/telefonicaid/fiware-orion/issues/579

opencv-1.0.0 does not compile

I am trying to compile an old code (not written by me) which uses opencv-1.0.0.
I am using 64 bit Scientific Linux 6.
I downloaded opencv-1.0.0 from sourceforge.
Then,
./configure
make
Then I get an error as follows
cvcap_dc1394.cpp: In function 'int icvSetFeatureCAM_DC1394(CvCaptureCAM_DC1394*, int, int)':
cvcap_dc1394.cpp:796: error: overloaded function with no contextual type information
make[3]: *** [cvcap_dc1394.lo] Error 1
make[3]: Leaving directory `/home/ram/opencv/opencv-1.0.0/otherlibs/highgui'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/ram/opencv/opencv-1.0.0/otherlibs'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/ram/opencv/opencv-1.0.0'
Any solutions? After googling a lot, I guess that my distro does not support IEEE1394 stack. Do I need to recompile my kernel? Any simpler way around this problem? I don't want to rewrite that code.
If you do not need the support for firewire, you could try to just disable it by using
./configure --without-1394libs
Does this solve your problem?

Resources