Git Product home page Git Product logo

Comments (10)

mickeyouyou avatar mickeyouyou commented on July 23, 2024

same cmake build error in ubuntu 18.04 x86.

from apriltag.

jimmccartney avatar jimmccartney commented on July 23, 2024

I've made some more progress but still not complete. I've changed 3 files and added -std=c99 flags to all 3 build targets:

CMakeFiles/apriltag_demo.dir/flags.make:5:C_FLAGS = -O2 -DNDEBUG -std=c99 CMakeFiles/apriltag_python.dir/build.make:68: /bin/cc -std=c99 -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -I/opt/rh/rh-python36/root/usr/include -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/opt/rh/rh-python36/root/usr/include/python3.6m -Wno-strict-prototypes -I/root/apriltag -c -o apriltag_pywrap.o /root/apriltag/apriltag_pywrap.c CMakeFiles/apriltag.dir/flags.make:5:C_FLAGS = -O2 -DNDEBUG -fPIC -std=c99
I also installed rh-python36-numpy package, as I am using software collections for python 3.6.
This got me all the way to the python
There is an error because the python build looks for the lib directory (I have lib64), so I soft-linked that.

Here is my last error:
# make install [ 83%] Built target apriltag [ 89%] Built target apriltag_demo [ 91%] Generating apriltag.cpython-36m-x86_64-linux-gnu.so /bin/ld: cannot find -lpython3.6m collect2: error: ld returned 1 exit status make[2]: *** [apriltag.cpython-36m-x86_64-linux-gnu.so] Error 1 make[1]: *** [CMakeFiles/apriltag_python.dir/all] Error 2 make: *** [all] Error 2

Thanks!

from apriltag.

mickeyouyou avatar mickeyouyou commented on July 23, 2024

this error maybe you can try add command link_directories(dir-to-libpython3.6.so).

I solved problem like this but lib is libpthread.so.

from apriltag.

mickeyouyou avatar mickeyouyou commented on July 23, 2024

I do some changes about default CMakeList.txt. but stoped at :

Generating apriltag_detect.docstring.h
[ 91%] Generating apriltag_pywrap.o
cc: error: unrecognized command line option ‘-fstack-protector-strong’
CMakeFiles/apriltag_python.dir/build.make:67: recipe for target 'apriltag_pywrap.o' failed
make[2]: *** [apriltag_pywrap.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/apriltag_python.dir/all' failed
make[1]: *** [CMakeFiles/apriltag_python.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

the error file

apriltag_pywrap.o: apriltag_pywrap.c
 65 apriltag_pywrap.o: apriltag_detect.docstring.h
 66 apriltag_pywrap.o: apriltag_py_type.docstring.h
 67         @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold --progress-dir=/home/apollo/apriltag/CMakeFiles --progress-n    um=$(CMAKE_PROGRESS_2) "Generating apriltag_pywrap.o"
 68         /usr/bin/cc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -Wall -g -fstack-protector-strong -Wformat -Werror=format-securi    ty -g -flto -fuse-linker-plugin -ffat-lto-objects -fPIC -I/usr/include/python3.6m -Wno-strict-prototypes -I/home/apollo/apriltag -c -o apr    iltag_pywrap.o /home/apollo/apriltag/apriltag_pywrap.c

from apriltag.

jimmccartney avatar jimmccartney commented on July 23, 2024

I got it compiled! I exported LIBRARY_PATH=/opt/rh/rh-python36/root/usr/lib64, which is my $LD_LIBRARY_PATH. Maybe it's working now.

# make install [ 83%] Built target apriltag [ 89%] Built target apriltag_demo [ 91%] Generating apriltag.cpython-36m-x86_64-linux-gnu.so [100%] Built target apriltag_python Install the project... -- Install configuration: "Release" -- Installing: /usr/local/lib64/libapriltag.so.3.1.0 -- Installing: /usr/local/lib64/libapriltag.so.3 -- Installing: /usr/local/lib64/libapriltag.so -- Installing: /usr/local/include/apriltag/apriltag.h -- Installing: /usr/local/include/apriltag/apriltag_math.h -- Installing: /usr/local/include/apriltag/apriltag_pose.h -- Installing: /usr/local/include/apriltag/common/doubles.h -- Installing: /usr/local/include/apriltag/common/doubles_floats_impl.h -- Installing: /usr/local/include/apriltag/common/floats.h -- Installing: /usr/local/include/apriltag/common/g2d.h -- Installing: /usr/local/include/apriltag/common/getopt.h -- Installing: /usr/local/include/apriltag/common/homography.h -- Installing: /usr/local/include/apriltag/common/image_types.h -- Installing: /usr/local/include/apriltag/common/image_u8.h -- Installing: /usr/local/include/apriltag/common/image_u8x3.h -- Installing: /usr/local/include/apriltag/common/image_u8x4.h -- Installing: /usr/local/include/apriltag/common/matd.h -- Installing: /usr/local/include/apriltag/common/math_util.h -- Installing: /usr/local/include/apriltag/common/pam.h -- Installing: /usr/local/include/apriltag/common/pjpeg.h -- Installing: /usr/local/include/apriltag/common/pnm.h -- Installing: /usr/local/include/apriltag/common/postscript_utils.h -- Installing: /usr/local/include/apriltag/common/string_util.h -- Installing: /usr/local/include/apriltag/common/svd22.h -- Installing: /usr/local/include/apriltag/common/time_util.h -- Installing: /usr/local/include/apriltag/common/timeprofile.h -- Installing: /usr/local/include/apriltag/common/unionfind.h -- Installing: /usr/local/include/apriltag/common/workerpool.h -- Installing: /usr/local/include/apriltag/common/zarray.h -- Installing: /usr/local/include/apriltag/common/zhash.h -- Installing: /usr/local/include/apriltag/common/zmaxheap.h -- Installing: /usr/local/include/apriltag/tag16h5.h -- Installing: /usr/local/include/apriltag/tag25h9.h -- Installing: /usr/local/include/apriltag/tag36h11.h -- Installing: /usr/local/include/apriltag/tagCircle21h7.h -- Installing: /usr/local/include/apriltag/tagCircle49h12.h -- Installing: /usr/local/include/apriltag/tagCustom48h12.h -- Installing: /usr/local/include/apriltag/tagStandard41h12.h -- Installing: /usr/local/include/apriltag/tagStandard52h13.h -- Installing: /usr/local/share/apriltag/cmake/apriltagConfig.cmake -- Installing: /usr/local/share/apriltag/cmake/apriltagConfig-release.cmake -- Installing: /usr/local/lib/pkgconfig/apriltag.pc cp: cannot create regular file ‘/root/.local/lib/python3.6/site-packages’: No such file or directory -- Installing: /usr/local/bin/apriltag_demo -- Set runtime path of "/usr/local/bin/apriltag_demo" to ""

from apriltag.

mickeyouyou avatar mickeyouyou commented on July 23, 2024

congratulations @jimmccartney

from apriltag.

mickeyouyou avatar mickeyouyou commented on July 23, 2024

I think this is a python link problem, comment python warp for now, and build successfully.

If you are intrested about diff, here is :https://gist.github.com/mickeyouyou/93da4086d2c2d5ace02555c90e89130b

from apriltag.

jimmccartney avatar jimmccartney commented on July 23, 2024

Okay, got it all working. Here are my notes that I think are complete:
Apriltag on RHEL7

from apriltag.

mkrogius avatar mkrogius commented on July 23, 2024

Sorry I didn't see this earlier. I've made some improvements to how the python wrapper works so it hopefully will now work without needing to set LIBRARY_PATH, but not totally sure.

from apriltag.

LamyZee avatar LamyZee commented on July 23, 2024

Add
SET(CMAKE_C_FLAGS "-std=c99")
at CmakeLists.txt on line 3.

from apriltag.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.