Giter Club home page Giter Club logo

Comments (11)

scheibel avatar scheibel commented on May 20, 2024

Maybe your CMake installation doesn't support generator expressions.
Which version of CMake do you use?

It may be that our minimum required CMake 2.8.12 is wrong.

from glbinding.

wizofoz avatar wizofoz commented on May 20, 2024

I'm using CMake 3.1.0-rc3 win32. Maybe it's because it's a release candidate?

from glbinding.

mrzzzrm avatar mrzzzrm commented on May 20, 2024

Fresh Ubuntu 14.04 with cmake version 2.8.12.2, g++ version 4.8.2, build via ./configure && ./configure && cd build && make works fine here.

from glbinding.

cgcostume avatar cgcostume commented on May 20, 2024

@wizofoz thanks a lot for the report. Can you please either test cmake 3.1.1 which was recently released or provide the full compile command line output - i would like to see if ${DEFAULT_COMPILE_FLAGS} has (a) the correct format and (b) mingw supported flags.

from glbinding.

wizofoz avatar wizofoz commented on May 20, 2024

Tested now with the new CMake 3.1.1 and I can confirm that this problem still exists:

-------------- Build: all in glbinding (compiler: GNU GCC Compiler)---------------

Checking if target is up-to-date: mingw32-make.exe -q -f Makefile all
Running command: D:/TDM-GCC-64/bin/mingw32-make.exe -f "D:/glbinding-build/Makefile"  VERBOSE=1 all
D:\cmake-3.1.1-win32-x86\bin\cmake.exe -HD:\glbinding-master -BD:\glbinding-build --check-build-system CMakeFiles\Makefile.cmake 0
D:\cmake-3.1.1-win32-x86\bin\cmake.exe -E cmake_progress_start D:\glbinding-build\CMakeFiles D:\glbinding-build\CMakeFiles\progress.marks
D:/TDM-GCC-64/bin/mingw32-make.exe -f CMakeFiles\Makefile2 all
mingw32-make.exe[1]: Entering directory 'D:/glbinding-build'
D:/TDM-GCC-64/bin/mingw32-make.exe -f source\glbinding\CMakeFiles\glbinding.dir\build.make source/glbinding/CMakeFiles/glbinding.dir/depend
mingw32-make.exe[2]: Entering directory 'D:/glbinding-build'
D:\cmake-3.1.1-win32-x86\bin\cmake.exe -E cmake_depends "MinGW Makefiles" D:\glbinding-master D:\glbinding-master\source\glbinding D:\glbinding-build D:\glbinding-build\source\glbinding D:\glbinding-build\source\glbinding\CMakeFiles\glbinding.dir\DependInfo.cmake --color=
Dependee "D:\glbinding-build\source\glbinding\CMakeFiles\glbinding.dir\DependInfo.cmake" is newer than depender "D:/glbinding-build/source/glbinding/CMakeFiles/glbinding.dir/depend.internal".
Dependee "D:/glbinding-build/source/glbinding/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "D:/glbinding-build/source/glbinding/CMakeFiles/glbinding.dir/depend.internal".
Scanning dependencies of target glbinding
mingw32-make.exe[2]: Leaving directory 'D:/glbinding-build'
D:/TDM-GCC-64/bin/mingw32-make.exe -f source\glbinding\CMakeFiles\glbinding.dir\build.make source/glbinding/CMakeFiles/glbinding.dir/build
mingw32-make.exe[2]: Entering directory 'D:/glbinding-build'
D:\cmake-3.1.1-win32-x86\bin\cmake.exe -E cmake_progress_report D:\glbinding-build\CMakeFiles 1
[  4%] 
Building CXX object source/glbinding/CMakeFiles/glbinding.dir/source/callbacks.cpp.obj
cd /d D:\glbinding-build\source\glbinding && D:\TDM-GCC-64\bin\g++.exe   -DGLBINDING_EXPORTS -DNDEBUG -DPIC -DSTRINGS_BY_GL -DUNICODE -DWIN32 -D_CRT_SECURE_NO_DEPRECATE -D_REENTRANT -D_UNICODE -Dglbinding_EXPORTS -std=gnu++11 -O3 -DNDEBUG @CMakeFiles/glbinding.dir/includes_CXX.rsp   "-pthread -pipe -fPIC -Wreturn-type -Wall -Wextra -Wfloat-equal -Wshadow -Wcast-align -Wconversion -fno-exceptions" -o CMakeFiles\glbinding.dir\source\callbacks.cpp.obj -c D:\glbinding-master\source\glbinding\source\callbacks.cpp
g++.exe: error: unrecognized command line option '-pthread -pipe -fPIC -Wreturn-type -Wall -Wextra -Wfloat-equal -Wshadow -Wcast-align -Wconversion -fno-exceptions'
mingw32-make.exe[2]: *** [source/glbinding/CMakeFiles/glbinding.dir/source/callbacks.cpp.obj] Error 1
mingw32-make.exe[1]: *** [source/glbinding/CMakeFiles/glbinding.dir/all] Error 2
mingw32-make.exe: *** [all] Error 2
source\glbinding\CMakeFiles\glbinding.dir\build.make:54: recipe for target 'source/glbinding/CMakeFiles/glbinding.dir/source/callbacks.cpp.obj' failed
mingw32-make.exe[2]: Leaving directory 'D:/glbinding-build'
CMakeFiles\Makefile2:98: recipe for target 'source/glbinding/CMakeFiles/glbinding.dir/all' failed
mingw32-make.exe[1]: Leaving directory 'D:/glbinding-build'
D:/glbinding-build/Makefile:126: recipe for target 'all' failed
Process terminated with status 2 (0 minute(s), 6 second(s))
4 error(s), 0 warning(s) (0 minute(s), 6 second(s))

from glbinding.

scheibel avatar scheibel commented on May 20, 2024

Seems like the error is generated because of the additional quotation marks (") around the actual gcc command line arguments. This way, the gcc tries to use the whole string as one command line argument, which is obviously invalid.

Removing the line actually "fixes" this bug, but also disables the given command line arguments for gcc.
Maybe @sbusch42 knows why cmake inserts the command line arguments with quotation marks. On all of our other systems the arguments are inserted without quotation marks, as on my system:

willy@willy-ThinkPad-T520:~/projects/glbinding/build$ VERBOSE=1 make
/usr/bin/cmake -H/home/willy/projects/glbinding -B/home/willy/projects/glbinding/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/willy/projects/glbinding/build/CMakeFiles /home/willy/projects/glbinding/build/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory `/home/willy/projects/glbinding/build'
make -f source/glbinding/CMakeFiles/glbinding.dir/build.make source/glbinding/CMakeFiles/glbinding.dir/depend
make[2]: Entering directory `/home/willy/projects/glbinding/build'
cd /home/willy/projects/glbinding/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/willy/projects/glbinding /home/willy/projects/glbinding/source/glbinding /home/willy/projects/glbinding/build /home/willy/projects/glbinding/build/source/glbinding /home/willy/projects/glbinding/build/source/glbinding/CMakeFiles/glbinding.dir/DependInfo.cmake --color=
make[2]: Leaving directory `/home/willy/projects/glbinding/build'
make -f source/glbinding/CMakeFiles/glbinding.dir/build.make source/glbinding/CMakeFiles/glbinding.dir/build
make[2]: Entering directory `/home/willy/projects/glbinding/build'
/usr/bin/cmake -E cmake_progress_report /home/willy/projects/glbinding/build/CMakeFiles 23
[  2%] Building CXX object source/glbinding/CMakeFiles/glbinding.dir/source/callbacks.cpp.o
cd /home/willy/projects/glbinding/build/source/glbinding && /usr/bin/c++   -DGLBINDING_EXPORTS -DGL_BY_STRINGS -DLINUX -DPIC -DSTRINGS_BY_GL -D_DEBUG -D_REENTRANT -Dglbinding_EXPORTS -std=gnu++11 -g -fPIC -I/home/willy/projects/glbinding/source/glbinding/include -I/home/willy/projects/glbinding/build/source    -fno-exceptions -pipe -Wall -Wextra -Werror -fPIC -Wreturn-type -Wcast-align -o CMakeFiles/glbinding.dir/source/callbacks.cpp.o -c /home/willy/projects/glbinding/source/glbinding/source/callbacks.cpp

from glbinding.

cgcostume avatar cgcostume commented on May 20, 2024

@wizofoz - can you please try to build the current master, i forgot to adjust the mingw platform settings to use cmake generator expressions a few weeks ago, sorry.

from glbinding.

wizofoz avatar wizofoz commented on May 20, 2024

Thank you for your prompt fix. Unfortunately I have still an error with -fPIC :
D:\glbinding-master\source\glbinding\source\callbacks.cpp:1:0: error: -fPIC ignored for target (all code is position independent) [-Werror]

It was only a warning in glbinding 1.0.4 :
D:\glbinding-1.0.4\source\glbinding\source\callbacks.cpp:1:0: warning: -fPIC ignored for target (all code is position independent)

This is the full output for master build :

-------------- Build: all in glbinding (compiler: GNU GCC Compiler)---------------

Checking if target is up-to-date: mingw32-make.exe -q -f Makefile all
Running command: D:/TDM-GCC-64/bin/mingw32-make.exe -f "D:/glbinding-build/Makefile"  VERBOSE=1 all
D:\cmake-3.1.1-win32-x86\bin\cmake.exe -HD:\glbinding-master -BD:\glbinding-build --check-build-system CMakeFiles\Makefile.cmake 0
D:\cmake-3.1.1-win32-x86\bin\cmake.exe -E cmake_progress_start D:\glbinding-build\CMakeFiles D:\glbinding-build\CMakeFiles\progress.marks
D:/TDM-GCC-64/bin/mingw32-make.exe -f CMakeFiles\Makefile2 all
mingw32-make.exe[1]: Entering directory 'D:/glbinding-build'
D:/TDM-GCC-64/bin/mingw32-make.exe -f source\glbinding\CMakeFiles\glbinding.dir\build.make source/glbinding/CMakeFiles/glbinding.dir/depend
mingw32-make.exe[2]: Entering directory 'D:/glbinding-build'
D:\cmake-3.1.1-win32-x86\bin\cmake.exe -E cmake_depends "MinGW Makefiles" D:\glbinding-master D:\glbinding-master\source\glbinding D:\glbinding-build D:\glbinding-build\source\glbinding D:\glbinding-build\source\glbinding\CMakeFiles\glbinding.dir\DependInfo.cmake --color=
Dependee "D:\glbinding-build\source\glbinding\CMakeFiles\glbinding.dir\DependInfo.cmake" is newer than depender "D:/glbinding-build/source/glbinding/CMakeFiles/glbinding.dir/depend.internal".
Dependee "D:/glbinding-build/source/glbinding/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "D:/glbinding-build/source/glbinding/CMakeFiles/glbinding.dir/depend.internal".
Scanning dependencies of target glbinding
mingw32-make.exe[2]: Leaving directory 'D:/glbinding-build'
D:/TDM-GCC-64/bin/mingw32-make.exe -f source\glbinding\CMakeFiles\glbinding.dir\build.make source/glbinding/CMakeFiles/glbinding.dir/build
mingw32-make.exe[2]: Entering directory 'D:/glbinding-build'
D:\cmake-3.1.1-win32-x86\bin\cmake.exe -E cmake_progress_report D:\glbinding-build\CMakeFiles 1
[  4%] 
Building CXX object source/glbinding/CMakeFiles/glbinding.dir/source/callbacks.cpp.obj
cd /d D:\glbinding-build\source\glbinding && D:\TDM-GCC-64\bin\g++.exe   -DGLBINDING_EXPORTS -DNDEBUG -DPIC -DSTRINGS_BY_GL -DUNICODE -DWIN32 -D_CRT_SECURE_NO_DEPRECATE -D_REENTRANT -D_UNICODE -Dglbinding_EXPORTS -std=gnu++11 -O3 -DNDEBUG @CMakeFiles/glbinding.dir/includes_CXX.rsp   -fno-exceptions -pthread -pipe -Wall -Wextra -Werror -fPIC -Wreturn-type -Wfloat-equal -Wcast-align -Wconversion -Wshadow -o CMakeFiles\glbinding.dir\source\callbacks.cpp.obj -c D:\glbinding-master\source\glbinding\source\callbacks.cpp
D:\glbinding-master\source\glbinding\source\callbacks.cpp:1:0: error: -fPIC ignored for target (all code is position independent) [-Werror]

 ^
cc1plus.exe: all warnings being treated as errors
mingw32-make.exe[2]: *** [source/glbinding/CMakeFiles/glbinding.dir/source/callbacks.cpp.obj] Error 1
mingw32-make.exe[1]: *** [source/glbinding/CMakeFiles/glbinding.dir/all] Error 2
mingw32-make.exe: *** [all] Error 2
source\glbinding\CMakeFiles\glbinding.dir\build.make:54: recipe for target 'source/glbinding/CMakeFiles/glbinding.dir/source/callbacks.cpp.obj' failed
mingw32-make.exe[2]: Leaving directory 'D:/glbinding-build'
CMakeFiles\Makefile2:98: recipe for target 'source/glbinding/CMakeFiles/glbinding.dir/all' failed
mingw32-make.exe[1]: Leaving directory 'D:/glbinding-build'
D:/glbinding-build/Makefile:126: recipe for target 'all' failed
Process terminated with status 2 (0 minute(s), 14 second(s))
4 error(s), 0 warning(s) (0 minute(s), 14 second(s))

from glbinding.

cgcostume avatar cgcostume commented on May 20, 2024

please try again, i removed fPIC

from glbinding.

wizofoz avatar wizofoz commented on May 20, 2024

It works perfectly now thank you very much!
Process terminated with status 0 (4 minute(s), 43 second(s)) 0 error(s), 0 warning(s)

from glbinding.

cgcostume avatar cgcostume commented on May 20, 2024

the tag 1.0.5 was updated, and now includes today's fixes

from glbinding.

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.