Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile error on gcc 4.9.3 #1512

Closed
jeroen opened this issue Jun 10, 2019 · 2 comments

Comments

@jeroen
Copy link

commented Jun 10, 2019

Hi! I was able to compile proj 6.1.0 with gcc 8.3.0, but I also need a build with the pre-cxx11 ABI using gcc 4.9.3. However this builds fails as below. Any suggestion for a fix?

libtool: compile:  /C/Rtools/mingw_32/bin/g++ -std=c++11 -DHAVE_CONFIG_H -I. -I../../proj-6.1.0/src -DPROJ_LIB=\"/mingw32/share/proj\" -DMUTEX_pthread -I../../proj-6.1.0/include -IC:/msys64/mingw32/include -I/mingw32/include -Wall -Wextra -Winit-self -Wunused-parameter -Wformat -Werror=format-security -Wno-format-nonliteral -Wlogical-op -Wshadow -Werror=vla -Wdate-time -Wfloat-conversion -Wmissing-declarations -Wnon-virtual-dtor -Weffc++ -Woverloaded-virtual -Wdeprecated -fno-operator-names -Wzero-as-null-pointer-constant -march=i686 -mtune=generic -O2 -pipe -fvisibility=hidden -MT iso19111/coordinateoperation.lo -MD -MP -MF iso19111/.deps/coordinateoperation.Tpo -c ../../proj-6.1.0/src/iso19111/coordinateoperation.cpp -o iso19111/coordinateoperation.o
libtool: compile:  /C/Rtools/mingw_32/bin/g++ -std=c++11 -DHAVE_CONFIG_H -I. -I../../proj-6.1.0/src -DPROJ_LIB=\"/mingw32/share/proj\" -DMUTEX_pthread -I../../proj-6.1.0/include -IC:/msys64/mingw32/include -I/mingw32/include -Wall -Wextra -Winit-self -Wunused-parameter -Wformat -Werror=format-security -Wno-format-nonliteral -Wlogical-op -Wshadow -Werror=vla -Wdate-time -Wfloat-conversion -Wmissing-declarations -Wnon-virtual-dtor -Weffc++ -Woverloaded-virtual -Wdeprecated -fno-operator-names -Wzero-as-null-pointer-constant -march=i686 -mtune=generic -O2 -pipe -fvisibility=hidden -MT iso19111/io.lo -MD -MP -MF iso19111/.deps/io.Tpo -c ../../proj-6.1.0/src/iso19111/io.cpp -o iso19111/io.o
../../proj-6.1.0/src/iso19111/coordinateoperation.cpp:567:1: error: function 'osgeo::proj::operation::GridDescription::GridDescription(osgeo::proj::operation::GridDescription&&)' defaulted on its redeclaration with an exception-specification that differs from the implicit declaration 'osgeo::proj::operation::GridDescription::GridDescription(osgeo::proj::operation::GridDescription&&)'
 GridDescription::GridDescription(GridDescription &&) noexcept = default;
 ^
make[2]: *** [Makefile:1769: iso19111/coordinateoperation.lo] Error 1
make[2]: *** Waiting for unfinished jobs....

To reproduce with a recent GCC, compile with CXX = "g++ -D_GLIBCXX_USE_CXX11_ABI=0"

Full build log: https://ci.appveyor.com/project/jeroen/rtools-backports/builds/25181069/job/96s9492qtii0cfsa

SO suggests one could simply remove the noexcept but that doesn't seem to work.

@rouault

This comment has been minimized.

Copy link
Member

commented Jun 11, 2019

@jeroen Can you try the patch of #1513 ?

@jeroen

This comment has been minimized.

Copy link
Author

commented Jun 11, 2019

Thanks! That fixed it! 🎉

@rouault rouault closed this in 839a312 Jun 11, 2019

rouault added a commit that referenced this issue Jun 11, 2019

Merge pull request #1513 from rouault/fix_gcc493_compilation
Fix compilation error with gcc 4.9.3 (fixes #1512)

backporting bot pushed a commit that referenced this issue Jun 11, 2019

rouault added a commit that referenced this issue Jun 11, 2019

Merge pull request #1514 from OSGeo/backport-1513-to-6.1
[Backport 6.1] Fix compilation error with gcc 4.9.3 (fixes #1512)

@rouault rouault added this to the 6.1.1 milestone Jun 11, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.