Giter Club home page Giter Club logo

Comments (4)

mnhrdt avatar mnhrdt commented on June 12, 2024

This kind of error happens when this flag "-fopenmp" is set somewhere but not everywhere. Can you please :

(1) run "make clean", then "make homography", and post the output
(2) post the output of "gdal-config --version", "gdal-config --cflags" and "gdal-config --libs"

from s2p.

elskedezeeeuw avatar elskedezeeeuw commented on June 12, 2024

Thanks for your response.
See output below.

elske@laptop:/software/s2p$ make homography
make -j -C c/homography
make[1]: Entering directory '/home/elske/software/s2p/c/homography'
g++ -march=native -O3 gdal-config --cflags -DCPU_LITTLE_END -mtune=native -msse2 -mfpmath=sse -fopenmp -c -o main.o main.cpp
g++ -march=native -O3 gdal-config --cflags -DCPU_LITTLE_END -mtune=native -msse2 -mfpmath=sse -fopenmp -c -o LibImages/LibImages.o LibImages/LibImages.cpp
g++ -march=native -O3 gdal-config --cflags -DCPU_LITTLE_END -mtune=native -msse2 -mfpmath=sse -fopenmp -c -o Utilities/Utilities.o Utilities/Utilities.cpp
g++ -march=native -O3 gdal-config --cflags -DCPU_LITTLE_END -mtune=native -msse2 -mfpmath=sse -fopenmp -c -o Utilities/Memory.o Utilities/Memory.cpp
g++ -march=native -O3 gdal-config --cflags -DCPU_LITTLE_END -mtune=native -msse2 -mfpmath=sse -fopenmp -c -o Utilities/Parameters.o Utilities/Parameters.cpp
g++ -march=native -O3 gdal-config --cflags -DCPU_LITTLE_END -mtune=native -msse2 -mfpmath=sse -fopenmp -c -o Utilities/Time.o Utilities/Time.cpp
g++ -march=native -O3 gdal-config --cflags -DCPU_LITTLE_END -mtune=native -msse2 -mfpmath=sse -fopenmp -c -o LibHomography/Homography.o LibHomography/Homography.cpp
g++ -march=native -O3 gdal-config --cflags -DCPU_LITTLE_END -mtune=native -msse2 -mfpmath=sse -fopenmp -c -o LibHomography/Splines.o LibHomography/Splines.cpp
g++ -o homography main.o LibImages/LibImages.o Utilities/Utilities.o Utilities/Memory.o Utilities/Parameters.o Utilities/Time.o LibHomography/Homography.o LibHomography/Splines.o gdal-config --libs
LibImages/LibImages.o: In function Image::Image()': LibImages.cpp:(.text+0x2c): undefined reference to omp_get_max_threads'
LibImages/LibImages.o: In function Image::Image(unsigned long, unsigned long, unsigned long, unsigned long)': LibImages.cpp:(.text+0x82): undefined reference to omp_get_max_threads'
LibImages/LibImages.o: In function Image::Image(float const*, unsigned long, unsigned long, unsigned long)': LibImages.cpp:(.text+0x146): undefined reference to omp_get_max_threads'
LibImages/LibImages.o: In function Image::readGDAL(char const*, unsigned long)': LibImages.cpp:(.text+0xda7): undefined reference to omp_get_max_threads'
LibImages/LibImages.o: In function Image::copyInner(Image&, int) const': LibImages.cpp:(.text+0x2960): undefined reference to omp_get_max_threads'
LibImages/LibImages.o:LibImages.cpp:(.text+0x486e): more undefined references to `omp_get_max_threads' follow
collect2: error: ld returned 1 exit status
Makefile:15: recipe for target 'homography' failed
make[1]: *** [homography] Error 1
make[1]: Leaving directory '/home/elske/software/s2p/c/homography'
makefile:45: recipe for target 'homography' failed
make: *** [homography] Error 2
elske@laptop:
/software/s2p$ gdal-config --version
1.11.3
elske@laptop:/software/s2p$ gdal-config --cflags
-I/usr/include/gdal
elske@laptop:
/software/s2p$ gdal-config --libs
-L/usr/lib -lgdal

from s2p.

mnhrdt avatar mnhrdt commented on June 12, 2024

It looks like you have set some variables that affect the compilation (for example CPPFLAGS, or TARGET_ARCH).

The settings "-DCPU_LITTLE_END -mtune=native -msse2 -mfpmath=sse -fopenmp" that appear on your compilation lines never appear inside the s2p code, nor they are produced by your installation of gdal, so they must have been set by your system.

You can look at all your variables by running "env", and then check for the offending ones by, for example "env | grep CPU". If you remove these variables the compilation should work.

Setting variables to direct the compilation is alright, but in your case they seem to be in an inconsistent state, because "-fopenmp" is only added to the compilation, and not to the link settings.

from s2p.

elskedezeeeuw avatar elskedezeeeuw commented on June 12, 2024

Thanks.

  1. unset CPPFLAGS
  2. make clean
  3. make all
    worked

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.