Comments (11)
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.
I'm using CMake 3.1.0-rc3 win32. Maybe it's because it's a release candidate?
from glbinding.
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.
@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.
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.
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.
@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.
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.
please try again, i removed fPIC
from glbinding.
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.
the tag 1.0.5 was updated, and now includes today's fixes
from glbinding.
Related Issues (20)
- Add Ubuntu 20.10 build for PPA HOT 2
- CMake fails to load library (installed from PPA): target glbinding::KHRplatform missing HOT 6
- Unable to build with Meson - use of `PRIVATE`/`PUBLIC` in `set()` HOT 1
- Per-feature headers and gl namespace HOT 1
- libglbinding.so.3 => not found by libglbinding-aux.so (bad runpath?) HOT 8
- Missing -lpthread HOT 2
- glbinding-3.1.0 conflicts with libglvnd-1.4.0 (installs files into the same place). Problematic file: /usr/local/include/KHR/khrplatform.h HOT 2
- libglbinding-dbg conflicts with libglbinding-dev HOT 1
- Syntax typo with namespaces in readme `Meta Information` code section HOT 1
- No Github Release for new updates? HOT 4
- CMake >3.20 warns on missing policy HOT 2
- GLhalf Should Be a Floating Point Type HOT 1
- Minor typos detected in README.md
- Passing wglGetProcAddress to glbinding::initialize HOT 2
- Examples from cginternals PPA are missing libcpplocate dependency
- glbinding conflicts with mesa-demos: both install HOT 2
- Context state overlap when initializing/releasing multiple contexts
- What does the first argument 0 or 1 mean for glbinding::initialize() function call in multi context application?
- GL_LINEAR_MIPMAP_LINEAR grouped with TextureWrapMode
- Don't assume prefix is either /usr or /usr/local
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from glbinding.