Coder Social home page Coder Social logo

Compiling binaries is unsuccessful about s2p HOT 9 CLOSED

miss3d avatar miss3d commented on June 1, 2024
Compiling binaries is unsuccessful

from s2p.

Comments (9)

carlodef avatar carlodef commented on June 1, 2024 1

Hi Thomas, if you're still stuck with compilation issues you may try the s2p docker image which is available here: https://hub.docker.com/r/carlodef/s2p/

from s2p.

dyoussef avatar dyoussef commented on June 1, 2024

Hello learning4life,
Can you try to compile specifying the location of GDAL with the environment variable "GDAL_DIR" (export GDAL_DIR=)? (https://cmake.org/cmake/help/v3.0/module/FindGDAL.html).

from s2p.

learning4life avatar learning4life commented on June 1, 2024

Hello David, thank you for your fast respond. I am very impressed with your results with this project!

When I upgrade GDAL to 1.11.3 on my other system I get the following error using the master branch:
g++ -g -O3 -I 3rdparty/GeographicLib-1.32/include -I 3rdparty/GeographicLib-1.32/man 3rdparty/GeographicLib-1.32/tools/CartConvert.cpp 3rdparty/GeographicLib-1.32/src/DMS.cpp 3rdparty/GeographicLib-1.32/src/Geocentric.cpp 3rdparty/GeographicLib-1.32/src/LocalCartesian.cpp -o bin/CartConvert
make: g++: Command not found
makefile:39: recipe for target 'bin/CartConvert' failed
make: *** [bin/CartConvert] Error 127

And when using your develop branch I end with:
make[2]: Leaving directory '/home/dem/local2/3rdparty/tiff-4.0.4beta/libtiff'
Makefile:537: recipe for target 'install-recursive' failed
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory '/home/dem/local2/3rdparty/tiff-4.0.4beta'
makefile:37: recipe for target '3rdparty/tiff-4.0.4beta/lib/libtiff.a' failed
make: *** [3rdparty/tiff-4.0.4beta/lib/libtiff.a] Error 2

Not sure if it is the GDAL problem anymore?

from s2p.

dyoussef avatar dyoussef commented on June 1, 2024

I think you must install g++ (https://ubuntuforums.org/showthread.php?t=1464768) to compile s2p master branch. Concerning the develop branch, we will remove unneeded libtiff sources soon so you will not need to compile libtiff.

from s2p.

learning4life avatar learning4life commented on June 1, 2024

Perfect David, by adding "sudo apt-get install build-essential g++" I was able to proceed.

The missing GDAL was fixed by installing "sudo apt-get install libgdal1-dev"

Both the s2p master and develop starts to compile, but stops with the same error:

  • Cannot find source file: pickopt.c

Error code
-- cd bin/build_homography; cmake -D CMAKE_BUILD_TYPE=Release ../../c/homography; make
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Try OpenMP C flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Try OpenMP CXX flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Found OpenMP: -fopenmp
-- Found GDAL: /usr/lib/libgdal.so
-- Configuring done
CMake Error at CMakeLists.txt:59 (add_executable):
Cannot find source file:

pickopt.c

Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
.hxx .in .txx

CMake Error: CMake can not determine linker language for target: homography
CMake Error: Cannot determine link language for target "homography".
-- Generating done
-- Build files have been written to: /home/r61/local2/bin/build_homography
make[1]: Entering directory '/home/r61/local2/bin/build_homography'
make[2]: Entering directory '/home/r61/local2/bin/build_homography'
make[3]: Entering directory '/home/r61/local2/bin/build_homography'
Scanning dependencies of target homography
make[3]: Leaving directory '/home/r61/local2/bin/build_homography'
make[3]: Entering directory '/home/r61/local2/bin/build_homography'
make[3]: *** No rule to make target 'CMakeFiles/homography.dir/build'. Stop.
make[3]: Leaving directory '/home/r61/local2/bin/build_homography'
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/homography.dir/all' failed
make[2]: *** [CMakeFiles/homography.dir/all] Error 2
make[2]: Leaving directory '/home/r61/local2/bin/build_homography'
Makefile:83: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/r61/local2/bin/build_homography'
makefile:68: recipe for target 'homography' failed
make: *** [homography] Error 2

from s2p.

dyoussef avatar dyoussef commented on June 1, 2024

c/homography/pickopt.c is a symbolic link to c/pickopt.c.
Can you check whether the symlink exists or not?

from s2p.

learning4life avatar learning4life commented on June 1, 2024

True, for a unknown reason the symlink is not created when s2p-master is unzipped into a folder like ~/local. When using ~/Documents/s2p-master the symlink is working on both my systems.

But when running make it stops prematurely at
"cp 3rdparty/mgm/mgm bin"

make output
~/Documents/s2p-master $ make
mkdir -p bin/build_homography
cd bin/build_homography; cmake ../../c/homography; make
-- Configuring done
-- Generating done
-- Build files have been written to: /home/dem/Documents/s2p-master/bin/build_homography
make[1]: Entering directory '/home/dem/Documents/s2p-master/bin/build_homography'
make[2]: Entering directory '/home/dem/Documents/s2p-master/bin/build_homography'
make[3]: Entering directory '/home/dem/Documents/s2p-master/bin/build_homography'
make[3]: Leaving directory '/home/dem/Documents/s2p-master/bin/build_homography'
[100%] Built target homography
make[2]: Leaving directory '/home/dem/Documents/s2p-master/bin/build_homography'
make[1]: Leaving directory '/home/dem/Documents/s2p-master/bin/build_homography'
cp bin/build_homography/homography bin
mkdir -p bin/build_sift
cd bin/build_sift; cmake ../../c/sift; make
-- Configuring done
-- Generating done
-- Build files have been written to: /home/dem/Documents/s2p-master/bin/build_sift
make[1]: Entering directory '/home/dem/Documents/s2p-master/bin/build_sift'
make[2]: Entering directory '/home/dem/Documents/s2p-master/bin/build_sift'
make[3]: Entering directory '/home/dem/Documents/s2p-master/bin/build_sift'
make[3]: Leaving directory '/home/dem/Documents/s2p-master/bin/build_sift'
[ 38%] Built target matching
make[3]: Entering directory '/home/dem/Documents/s2p-master/bin/build_sift'
make[3]: Leaving directory '/home/dem/Documents/s2p-master/bin/build_sift'
[100%] Built target sift_roi
make[2]: Leaving directory '/home/dem/Documents/s2p-master/bin/build_sift'
make[1]: Leaving directory '/home/dem/Documents/s2p-master/bin/build_sift'
cp bin/build_sift/sift_roi bin
cp bin/build_sift/matching bin
cc -std=c99 -g -O3 -DNDEBUG -DDONT_USE_TEST_MAIN c/plambda.c c/iio.o -o bin/plambda -lz -ltiff -lpng -ljpeg -lm
c/iio.o: In function iio_save_image_as_tiff_smarter': /home/dem/Documents/s2p-master/c/iio.c:2326: warning: the use of tmpnam' is dangerous, better use mkstemp' cd 3rdparty/mgm; make make[1]: Entering directory '/home/dem/Documents/s2p-master/3rdparty/mgm' gcc -std=c99 -O3 -DNDEBUG -ffast-math -fopenmp -DIIO_ABORT_ON_ERROR -Wno-deprecated-declarations -c iio/iio.c -o iio.o g++ -O3 -DNDEBUG -ffast-math -fopenmp -Iiio -Icommon -DTEST_MAIN mgm.cc img.cc point.cc iio.o -o mgm -lpng -ltiff -ljpeg iio.o: In function iio_save_image_as_tiff_smarter':
iio.c:(.text+0x3aa7): warning: the use of tmpnam' is dangerous, better use mkstemp'
make[1]: Leaving directory '/home/dem/Documents/s2p-master/3rdparty/mgm'
cp 3rdparty/mgm/mgm bin

from s2p.

carlodef avatar carlodef commented on June 1, 2024

Hi Thomas,
I don't see any error in you output. The compilation succeeded.

from s2p.

learning4life avatar learning4life commented on June 1, 2024

Hi Carlo, thank you for your follow-up. I can confirm that your latest update has solved my compilation issue. Nice addition with the s2p docker image.
I now feel confident applying your s2p to my dataset in my master thesis project!
Kind regards
Thomas

from s2p.

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.