Error in building CGAL example Triangulation_2 - cgal

I installed CGAL and tried to follow manual, but I failed to build example Triangulation_2. I used terminal in mac and run the code.
[ 50%] Building CXX object CMakeFiles/draw_triangulation_2.dir/draw_triangulation_2.cpp.o
In file included from /Users/janeh/Downloads/CGAL-5.0.2/examples/Triangulation_2/draw_triangulation_2.cpp:3:
/usr/local/include/CGAL/draw_triangulation_2.h:16:10: fatal error:
'CGAL/Qt/Basic_viewer_qt.h' file not found
#include <CGAL/Qt/Basic_viewer_qt.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/draw_triangulation_2.dir/draw_triangulation_2.cpp.o] Error 1
make[1]: *** [CMakeFiles/draw_triangulation_2.dir/all] Error 2
I checked Basic_viewer_qt.h and it is at the right location
/Users/janeh/Downloads/CGAL-5.0.2/include/CGAL/Qt/Basic_viewer_qt.h
But somehow draw_triangulation_2.h can't include it. Is there any reason why this happens?

Related

x265 - Undefined symbols for architecture arm64 (Apple Silicon)

any ideas for this?
I try to build SDRangel on my M1 Mac but at 77% I get this error ...
-- GIT_EXECUTABLE /opt/local/bin/git
-- GIT LIVE REPO VERSION RETRIEVED
-- X265 RELEASE VERSION 3.5+68-40e37bce9
-- Detected CXX compiler using -O3 optimization level
-- Configuring done
-- Generating done
-- Build files have been written to: /opt/build/sdrangel/build/external/x265/src/x265-build
[ 27%] Performing build step for 'x265'
Consolidate compiler generated dependencies of target common
[ 45%] Built target common
Consolidate compiler generated dependencies of target encoder
[ 65%] Built target encoder
[ 76%] Built target x265-static
[ 77%] Linking CXX shared library libx265.dylib
Undefined symbols for architecture arm64:
"x265_entropyStateBits", referenced from:
_x265_costCoeffNxN_neon in pixel-util.S.o
(maybe you meant: _x265_entropyStateBits)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[5]: *** [libx265.206.dylib] Error 1
make[4]: *** [CMakeFiles/x265-shared.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [external/x265/src/x265-stamp/x265-build] Error 2
make[1]: *** [external/CMakeFiles/x265.dir/all] Error 2
make: *** [all] Error 2
I am stuck. Don't know what to try to solve this issue.
I did not find anything anywhere ...
Working on it for most of 2 days, I did find this site that presents a working method of building libx265 stuff on Apple Silicon and works for me on macOS 13.0.1. https://www.osxexperts.net/ Problem is, it only builds the libraries for building it into ffmpeg, no executable binary.
When I tried to get the executable also, by removing -DENABLE_CLI=OFF from the last cmake command, the error comes back. Put it back in, everything completes without error.
Here is the full process that works for me (no executable). It builds a multilibrary that can encode 8, 10, or 12-bit video:
cd x265/source
#### 12 bit
cmake -DCMAKE_INSTALL_PREFIX:PATH=${TARGET} -DHIGH_BIT_DEPTH=ON -DMAIN12=ON -DENABLE_SHARED=NO -DEXPORT_C_API=NO -DENABLE_CLI=OFF .
make
mv libx265.a libx265_main12.a
make clean-generated
rm CMakeCache.txt
#### 10bit
cmake -DCMAKE_INSTALL_PREFIX:PATH=${TARGET} -DHIGH_BIT_DEPTH=ON -DMAIN10=ON -DENABLE_SHARED=NO -DEXPORT_C_API=NO -DENABLE_CLI=OFF .
make clean
make
mv libx265.a libx265_main10.a
make clean-generated && rm CMakeCache.txt
#### 8 bit and all together
# removed -DENABLE_CLI=OFF from last one so we get the x265 binary
cmake -DCMAKE_INSTALL_PREFIX:PATH=${TARGET} -DEXTRA_LIB="x265_main10.a;x265_main12.a" -DEXTRA_LINK_FLAGS=-L. -DLINKED_10BIT=ON -DLINKED_12BIT=ON -DENABLE_SHARED=OFF -DENABLE_CLI=OFF .
make clean
make
mv libx265.a libx265_main.a
# this is Apple's libtool
libtool -static -o libx265.a libx265_main.a libx265_main10.a libx265_main12.a
make install
When I remove the last -DENABLE_CLI=OFF, here's the error:
[100%] Linking CXX executable x265
Undefined symbols for architecture arm64:
"x265_entropyStateBits", referenced from:
_x265_costCoeffNxN_neon in libx265.a(pixel-util.S.o)
_x265_10bit_costCoeffNxN_neon in libx265_main10.a(pixel-util.S.o)
_x265_12bit_costCoeffNxN_neon in libx265_main12.a(pixel-util.S.o)
(maybe you meant: _x265_entropyStateBits)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [x265] Error 1
make[1]: *** [CMakeFiles/cli.dir/all] Error 2
make: *** [all] Error 2
JimsMBPro:source jim$
EDIT: #Peter Betz, see the issue report. Until the developers correct this error, it will compile if you edit x265/source/common/aarch64/pixel-util.S, line 2410. Add an underscore as follows. Change:
movrel x1, x265_entropyStateBits
to
movrel x1, _x265_entropyStateBits

Error in Compiling DLPC3010 DLPC-API in jetson Nano

I am trying to compile DLPC Projector APIs in the jetson nano. However, it is throwing an error as in added snapshot. I came across one solution here. However it is not being helpful.
DLPC-APS - https://www.ti.com/tool/DLPC-API
ig#ig-desktop:~/Desktop/Texas Instruments/DLPC-API-1.8/samples/dlpc654x_samples/build$ cmake ../
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ig/Desktop/Texas Instruments/DLPC-API-1.8/samples/dlpc654x_samples/build
ig#ig-desktop:~/Desktop/Texas Instruments/DLPC-API-1.8/samples/dlpc654x_samples/build$ make
[ 4%] Building C object CMakeFiles/libdlpc654x_sample.dir/home/ig/Desktop/Texas_Instruments/DLPC-API-1.8/api/dlpc_common.c.o
cc: error: unrecognized command line option ‘-m32’
CMakeFiles/libdlpc654x_sample.dir/build.make:75: recipe for target 'CMakeFiles/libdlpc654x_sample.dir/home/ig/Desktop/Texas_Instruments/DLPC-API-1.8/api/dlpc_common.c.o' failed
make[2]: *** [CMakeFiles/libdlpc654x_sample.dir/home/ig/Desktop/Texas_Instruments/DLPC-API-1.8/api/dlpc_common.c.o] Error 1
CMakeFiles/Makefile2:88: recipe for target 'CMakeFiles/libdlpc654x_sample.dir/all' failed

error build all ros packages in this repo the error occur in catkin_make step

I followed instruction by Michael Huang.
My error message reads:
In file included from /home/evadro/quadevac_sim_ws/catkin_ws/src/menge_gazebo/menge_congregate/include/MengeCong.h:10:0,
from /home/evadro/quadevac_sim_ws/catkin_ws/src/menge_gazebo/menge_congregate/src/MengeCong.cpp:8:
/home/evadro/quadevac_sim_ws/catkin_ws/src/menge_gazebo/menge_congregate/../menge_common/include/MengePlugin.h:13:44: fatal error: gazebo/physics/InstancedActor.hh: No such file or directory
compilation terminated.
menge_gazebo/menge_congregate/CMakeFiles/menge_congregate.dir/build.make:62: recipe for target 'menge_gazebo/menge_congregate/CMakeFiles/menge_congregate.dir/src/MengeCong.cpp.o' failed
make[2]: * [menge_gazebo/menge_congregate/CMakeFiles/menge_congregate.dir/src/MengeCong.cpp.o] Error 1
CMakeFiles/Makefile2:4099: recipe for target 'menge_gazebo/menge_congregate/CMakeFiles/menge_congregate.dir/all' failed
make[1]: * [menge_gazebo/menge_congregate/CMakeFiles/menge_congregate.dir/all]
The 2nd error is:
make[1]: *** Waiting for unfinished jobs....
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j24 -l24" failed
Your Error is gazebo/physics/InstancedActor.hh No such file or directory.
this header is not on standard version of Gazebo.
Make Sure you Compiled Gazebo Repo mentioned in External Depenencies Here with No errors. Then Double checks paths so compiler can find the missing headers.

How to fix cmGLobalNInjaGenerator.cxx.o" error of cmake?

I am installing a newer version of cmake which is cmake 3.10.1 and the make command is giving me error while building CXX object source.
I have installed the ninja 1.5.1 but still getting the same error.
used this to install the cmake:
wget <link of the cmake3.10.1>
./configure
make # (at this stage getting error)
The error is:
[ 83%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmGlobalNinjaGenerator.cxx.o
/media/nadia/967E9B477E9B1F55/data/cmake-3.10.1/Source/cmGlobalNinjaGenerator.cxx: In member function ‘void cmGlobalNinjaGenerator::AppendTargetDependsClosure(const cmGeneratorTarget*, cmNinjaOuts&, bool)’:
/media/nadia/967E9B477E9B1F55/data/cmake-3.10.1/Source/cmGlobalNinjaGenerator.cxx:1077:40: error: ‘class std::map<const cmGeneratorTarget*, std::set<std::basic_string<char> > >’ has no member named ‘emplace_hint’
Source/CMakeFiles/CMakeLib.dir/build.make:5942: recipe for target 'Source/CMakeFiles/CMakeLib.dir/cmGlobalNinjaGenerator.cxx.o' failed
make[2]: *** [Source/CMakeFiles/CMakeLib.dir/cmGlobalNinjaGenerator.cxx.o] Error 1
CMakeFiles/Makefile2:2355: recipe for target 'Source/CMakeFiles/CMakeLib.dir/all' failed
make[1]: *** [Source/CMakeFiles/CMakeLib.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2

ld unrecognised emulation mode aarch64linux

When running make in CMake, I only get an error that says /usr/bin/ld unrecognised emulation mode aarch64linux.
Im trying to build DualBootPatcher app for Android, this is the error:
/usr/bin/ld: unrecognised emulation mode: aarch64linux
Supported emulations: elf_x86_64 elf32_x86_64 elf_i386 elf_iamcu elf_l1om elf_k1om i386pep i386pe
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[5]: *** [misc/CMakeFiles/fsck-wrapper.dir/build.make:76: misc/fsck-wrapper] Error 1
make[4]: *** [CMakeFiles/Makefile2:1786: misc/CMakeFiles/fsck-wrapper.dir/all] Error 2
make[3]: *** [Makefile:163: all] Error 2
make[2]: *** [android/CMakeFiles/android-system_arm64-v8a.dir/build.make:111: android/android-system_arm64-v8a-prefix/src/android-system_arm64-v8a-stamp/android-system_arm64-v8a-build] Error 2
make[1]: *** [CMakeFiles/Makefile2:1868: android/CMakeFiles/android-system_arm64-v8a.dir/all] Error 2
make: *** [Makefile:163: all] Error 2>
Im running latest Cmake and binutils. Also tried reinstalling binutils.
Im NOT a developers, so it would be nice if you could explain it^^
Does anyone has a solution?
The issue is clear from the fact that the output is coming from /usr/bin/ld. This is the system ld, rather than the ld included with the NDK. You should investigate why this ld is being executed instead, for example via strace.
For me it turned out to be a file permissions issue - the NDK zip file had extracted without execute permissions, so the toolchain binaries were silently ignored. A few chmod +x later and all was well.