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

Installing libzen fails with directory fractions in wrong scope #58

Closed
LigH-de opened this issue Jul 4, 2017 · 9 comments
Closed

Installing libzen fails with directory fractions in wrong scope #58

LigH-de opened this issue Jul 4, 2017 · 9 comments
Assignees

Comments

@LigH-de
Copy link

LigH-de commented Jul 4, 2017

I'm using jb-alvarado's media-autobuild suite, which also builds libzen for MediaInfo. Your project recently had a few commits, whereas "mabs" was not updated in relation to libzen, so I wonder if there is a mistake in your patches which inserts a pseudo full-qualified source path into CMake scripts in an MSYS2 environment, where adding a relative path would have been suitable, or replacing the whole path with the full-qualified one be required:

LDFLAGS: -pipe -static-libgcc -static-libstdc++
make install
Scanning dependencies of target zen
[  4%] Building CXX object CMakeFiles/zen.dir/H_/dev/mabs/build/libzen-git/Source/ZenLib/Conf.cpp.o
[  8%] Building CXX object CMakeFiles/zen.dir/H_/dev/mabs/build/libzen-git/Source/ZenLib/CriticalSection.cpp.o
<command-line>:0:2: warning: ISO C++11 requires whitespace after the macro name
<command-line>:0:2: warning: ISO C++11 requires whitespace after the macro name
[ 12%] Building CXX object CMakeFiles/zen.dir/H_/dev/mabs/build/libzen-git/Source/ZenLib/Dir.cpp.o
<command-line>:0:2: warning: ISO C++11 requires whitespace after the macro name
<command-line>:0:3: error: expected primary-expression before '/' token
<command-line>:0:4: error: 'dev' was not declared in this scope
<command-line>:0:8: error: 'mabs' was not declared in this scope
<command-line>:0:13: error: 'msys64' was not declared in this scope
<command-line>:0:20: error: 'D_FILE_OFFSET_BITS' was not declared in this scope
<command-line>:0:20: note: suggested alternative: 'FILE_OPEN_IF'
<command-line>:0:20: error: expected ';' at end of member declaration
<command-line>:0:39: error: expected unqualified-id before numeric constant
<command-line>:0:3: error: expected primary-expression before '/' token
<command-line>:0:4: error: 'dev' was not declared in this scope
<command-line>:0:8: error: 'mabs' was not declared in this scope
<command-line>:0:13: error: 'msys64' was not declared in this scope
<command-line>:0:20: error: 'D_FILE_OFFSET_BITS' was not declared in this scope
<command-line>:0:20: note: suggested alternative: 'FILE_OPEN_IF'
<command-line>:0:20: error: expected ';' at end of member declaration
<command-line>:0:39: error: expected unqualified-id before numeric constant
make[2]: *** [CMakeFiles/zen.dir/build.make:87: CMakeFiles/zen.dir/H_/dev/mabs/build/libzen-git/Source/ZenLib/CriticalSection.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/zen.dir/build.make:111: CMakeFiles/zen.dir/H_/dev/mabs/build/libzen-git/Source/ZenLib/Dir.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:100: CMakeFiles/zen.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
[  4%] Building CXX object CMakeFiles/zen.dir/H_/dev/mabs/build/libzen-git/Source/ZenLib/CriticalSection.cpp.o
<command-line>:0:2: warning: ISO C++11 requires whitespace after the macro name
<command-line>:0:3: error: expected primary-expression before '/' token
<command-line>:0:4: error: 'dev' was not declared in this scope
<command-line>:0:8: error: 'mabs' was not declared in this scope
<command-line>:0:13: error: 'msys64' was not declared in this scope
<command-line>:0:20: error: 'D_FILE_OFFSET_BITS' was not declared in this scope
<command-line>:0:20: note: suggested alternative: 'FILE_OPEN_IF'
<command-line>:0:20: error: expected ';' at end of member declaration
<command-line>:0:39: error: expected unqualified-id before numeric constant
make[2]: *** [CMakeFiles/zen.dir/build.make:87: CMakeFiles/zen.dir/H_/dev/mabs/build/libzen-git/Source/ZenLib/CriticalSection.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:100: CMakeFiles/zen.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
@JeromeMartinez
Copy link
Member

Your project recently had a few commits

Did you test with the code merges done this morning (there are some code change about CMake).
Pinging @evpobr, maybe some ideas about the issue?

@LigH-de
Copy link
Author

LigH-de commented Jul 4, 2017

Apparently, mabs applies some own patches/sed's; possible that they don't match your new commits anymore, @wiiaboo is investigating as well.

@JeromeMartinez
Copy link
Member

OK, I suggest that first you are sure that this comes from our modifications, before we check on our side problems in our modifications.

@wiiaboo
Copy link
Contributor

wiiaboo commented Jul 4, 2017

It's probably not from our side. The only thing we change is the "NOT WIN32" to "NOT MSVC" in order to create a pkg-config file, but I'll submit a proper PR to fix that.

@wiiaboo
Copy link
Contributor

wiiaboo commented Jul 4, 2017

Both "MSYS Makefiles" and Ninja generators are failing with the same issue.

Here's output with make VERBOSE=1:

$ make VERBOSE=1
/C/builds/ab/msys64/mingw64/bin/cmake.exe -H/C/builds/ab/build/libzen-git/Project/CMake -B/C/builds/ab/build/libzen-git/build-test-64bit --check-build-system CMakeFiles/Makefile.cmake 0
/C/builds/ab/msys64/mingw64/bin/cmake.exe -E cmake_progress_start /C/builds/ab/build/libzen-git/build-test-64bit/CMakeFiles /C/builds/ab/build/libzen-git/build-test-64bit/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/trunk/build/libzen-git/build-test-64bit'
make -f CMakeFiles/zen.dir/build.make CMakeFiles/zen.dir/depend
make[2]: Entering directory '/trunk/build/libzen-git/build-test-64bit'
/C/builds/ab/msys64/mingw64/bin/cmake.exe -E cmake_depends "MSYS Makefiles" /C/builds/ab/build/libzen-git/Project/CMake /C/builds/ab/build/libzen-git/Project/CMake /C/builds/ab/build/libzen-git/build-test-64bit /C/builds/ab/build/libzen-git/build-test-64bit /C/builds/ab/build/libzen-git/build-test-64bit/CMakeFiles/zen.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/trunk/build/libzen-git/build-test-64bit'
make -f CMakeFiles/zen.dir/build.make CMakeFiles/zen.dir/build
make[2]: Entering directory '/trunk/build/libzen-git/build-test-64bit'
[  4%] Building CXX object CMakeFiles/zen.dir/C_/builds/ab/build/libzen-git/Source/ZenLib/CriticalSection.cpp.o
/C/builds/ab/msys64/mingw64/bin/g++.exe  -D/D_FILE_OFFSET_BITS=64 -DUNICODE -D_UNICODE -I/C/builds/ab/build/libzen-git/Project/CMake/../../Source  -mthreads -mtune=generic -O2 -pipe -O3 -DNDEBUG   -o CMakeFiles/zen.dir/C_/builds/ab/build/libzen-git/Source/ZenLib/CriticalSection.cpp.o -c /C/builds/ab/build/libzen-git/Source/ZenLib/CriticalSection.cpp
<command-line>:0:2: warning: ISO C++11 requires whitespace after the macro name
<command-line>:0:3: error: expected primary-expression before '/' token
<command-line>:0:4: error: 'builds' was not declared in this scope
<command-line>:0:11: error: 'ab' was not declared in this scope
<command-line>:0:11: note: suggested alternative: 'abs'
<command-line>:0:14: error: 'msys64' was not declared in this scope
<command-line>:0:14: note: suggested alternative: '_abs64'
<command-line>:0:21: error: 'D_FILE_OFFSET_BITS' was not declared in this scope
<command-line>:0:21: note: suggested alternative: 'FILE_OPEN_IF'
<command-line>:0:21: error: expected ';' at end of member declaration
<command-line>:0:40: error: expected unqualified-id before numeric constant
make[2]: *** [CMakeFiles/zen.dir/build.make:87: CMakeFiles/zen.dir/C_/builds/ab/build/libzen-git/Source/ZenLib/CriticalSection.cpp.o] Error 1
make[2]: Leaving directory '/trunk/build/libzen-git/build-test-64bit'
make[1]: *** [CMakeFiles/Makefile2:100: CMakeFiles/zen.dir/all] Error 2
make[1]: Leaving directory '/trunk/build/libzen-git/build-test-64bit'
make: *** [Makefile:130: all] Error 2

and with ninja:

[1/24] Building CXX object CMakeFiles/zen.dir/C_/builds/ab/build/libzen-git/Source/ZenLib/MemoryDebug.cpp.o
FAILED: CMakeFiles/zen.dir/C_/builds/ab/build/libzen-git/Source/ZenLib/MemoryDebug.cpp.o
C:\builds\ab\msys64\mingw64\bin\c++.exe  -D/D_FILE_OFFSET_BITS=64 -DUNICODE -D_UNICODE -IC:/builds/ab/build/libzen-git/Project/CMake/../../Source -mthreads -mtune=generic -O2 -pipe -O3 -DNDEBUG -MD -MT CMakeFiles/zen.dir/C_/builds/ab/build/libzen-git/Source/ZenLib/MemoryDebug.cpp.o -MF CMakeFiles\zen.dir\C_\builds\ab\build\libzen-git\Source\ZenLib\MemoryDebug.cpp.o.d -o CMakeFiles/zen.dir/C_/builds/ab/build/libzen-git/Source/ZenLib/MemoryDebug.cpp.o -c C:/builds/ab/build/libzen-git/Source/ZenLib/MemoryDebug.cpp
<command-line>:0:1: error: macro names must be identifiers
[2/24] Building CXX object CMakeFiles/zen.dir/C_/builds/ab/build/libzen-git/Source/ZenLib/Format/Http/Http_Utils.cpp.o
FAILED: CMakeFiles/zen.dir/C_/builds/ab/build/libzen-git/Source/ZenLib/Format/Http/Http_Utils.cpp.o
C:\builds\ab\msys64\mingw64\bin\c++.exe  -D/D_FILE_OFFSET_BITS=64 -DUNICODE -D_UNICODE -IC:/builds/ab/build/libzen-git/Project/CMake/../../Source -mthreads -mtune=generic -O2 -pipe -O3 -DNDEBUG -MD -MT CMakeFiles/zen.dir/C_/builds/ab/build/libzen-git/Source/ZenLib/Format/Http/Http_Utils.cpp.o -MF CMakeFiles\zen.dir\C_\builds\ab\build\libzen-git\Source\ZenLib\Format\Http\Http_Utils.cpp.o.d -o CMakeFiles/zen.dir/C_/builds/ab/build/libzen-git/Source/ZenLib/Format/Http/Http_Utils.cpp.o -c C:/builds/ab/build/libzen-git/Source/ZenLib/Format/Http/Http_Utils.cpp
<command-line>:0:1: error: macro names must be identifiers
[3/24] Building CXX object CMakeFiles/zen.dir/C_/builds/ab/build/libzen-git/Source/ZenLib/Utils.cpp.o
FAILED: CMakeFiles/zen.dir/C_/builds/ab/build/libzen-git/Source/ZenLib/Utils.cpp.o
C:\builds\ab\msys64\mingw64\bin\c++.exe  -D/D_FILE_OFFSET_BITS=64 -DUNICODE -D_UNICODE -IC:/builds/ab/build/libzen-git/Project/CMake/../../Source -mthreads -mtune=generic -O2 -pipe -O3 -DNDEBUG -MD -MT CMakeFiles/zen.dir/C_/builds/ab/build/libzen-git/Source/ZenLib/Utils.cpp.o -MF CMakeFiles\zen.dir\C_\builds\ab\build\libzen-git\Source\ZenLib\Utils.cpp.o.d -o CMakeFiles/zen.dir/C_/builds/ab/build/libzen-git/Source/ZenLib/Utils.cpp.o -c C:/builds/ab/build/libzen-git/Source/ZenLib/Utils.cpp
<command-line>:0:1: error: macro names must be identifiers
[4/24] Building CXX object CMakeFiles/zen.dir/C_/builds/ab/build/libzen-git/Source/ZenLib/Format/Http/Http_Request.cpp.o
FAILED: CMakeFiles/zen.dir/C_/builds/ab/build/libzen-git/Source/ZenLib/Format/Http/Http_Request.cpp.o
C:\builds\ab\msys64\mingw64\bin\c++.exe  -D/D_FILE_OFFSET_BITS=64 -DUNICODE -D_UNICODE -IC:/builds/ab/build/libzen-git/Project/CMake/../../Source -mthreads -mtune=generic -O2 -pipe -O3 -DNDEBUG -MD -MT CMakeFiles/zen.dir/C_/builds/ab/build/libzen-git/Source/ZenLib/Format/Http/Http_Request.cpp.o -MF CMakeFiles\zen.dir\C_\builds\ab\build\libzen-git\Source\ZenLib\Format\Http\Http_Request.cpp.o.d -o CMakeFiles/zen.dir/C_/builds/ab/build/libzen-git/Source/ZenLib/Format/Http/Http_Request.cpp.o -c C:/builds/ab/build/libzen-git/Source/ZenLib/Format/Http/Http_Request.cpp
<command-line>:0:1: error: macro names must be identifiers
[5/24] Building CXX object CMakeFiles/zen.dir/C_/builds/ab/build/libzen-git/Source/ZenLib/Ztring.cpp.o
FAILED: CMakeFiles/zen.dir/C_/builds/ab/build/libzen-git/Source/ZenLib/Ztring.cpp.o
C:\builds\ab\msys64\mingw64\bin\c++.exe  -D/D_FILE_OFFSET_BITS=64 -DUNICODE -D_UNICODE -IC:/builds/ab/build/libzen-git/Project/CMake/../../Source -mthreads -mtune=generic -O2 -pipe -O3 -DNDEBUG -MD -MT CMakeFiles/zen.dir/C_/builds/ab/build/libzen-git/Source/ZenLib/Ztring.cpp.o -MF CMakeFiles\zen.dir\C_\builds\ab\build\libzen-git\Source\ZenLib\Ztring.cpp.o.d -o CMakeFiles/zen.dir/C_/builds/ab/build/libzen-git/Source/ZenLib/Ztring.cpp.o -c C:/builds/ab/build/libzen-git/Source/ZenLib/Ztring.cpp
<command-line>:0:1: error: macro names must be identifiers
[6/24] Building CXX object CMakeFiles/zen.dir/C_/builds/ab/build/libzen-git/Source/ZenLib/OS_Utils.cpp.o
FAILED: CMakeFiles/zen.dir/C_/builds/ab/build/libzen-git/Source/ZenLib/OS_Utils.cpp.o
C:\builds\ab\msys64\mingw64\bin\c++.exe  -D/D_FILE_OFFSET_BITS=64 -DUNICODE -D_UNICODE -IC:/builds/ab/build/libzen-git/Project/CMake/../../Source -mthreads -mtune=generic -O2 -pipe -O3 -DNDEBUG -MD -MT CMakeFiles/zen.dir/C_/builds/ab/build/libzen-git/Source/ZenLib/OS_Utils.cpp.o -MF CMakeFiles\zen.dir\C_\builds\ab\build\libzen-git\Source\ZenLib\OS_Utils.cpp.o.d -o CMakeFiles/zen.dir/C_/builds/ab/build/libzen-git/Source/ZenLib/OS_Utils.cpp.o -c C:/builds/ab/build/libzen-git/Source/ZenLib/OS_Utils.cpp
<command-line>:0:1: error: macro names must be identifiers
ninja: build stopped: subcommand failed.

@wiiaboo
Copy link
Contributor

wiiaboo commented Jul 4, 2017

I git bisected the issue to 809df5f.

@JeromeMartinez
Copy link
Member

I git bisected the issue to 809df5f.

Thanks. @evpobr, your change, would you mind to check what is causing the issue?

@wiiaboo
Copy link
Contributor

wiiaboo commented Jul 4, 2017

Changing the /D to -D seems to fix it, I'll send a PR to make sure MSVC works with those instead.

@evpobr
Copy link
Contributor

evpobr commented Jul 4, 2017

@JeromeMartinez , sorry, i was buzy a little bit. Yep, that's was my bug with definitions, thanks @wiiaboo to fix my bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants