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

libcdr build failing #2190

Closed
Ede123 opened this issue Feb 20, 2017 · 11 comments · Fixed by #2202
Closed

libcdr build failing #2190

Ede123 opened this issue Feb 20, 2017 · 11 comments · Fixed by #2202

Comments

@Ede123
Copy link
Contributor

Ede123 commented Feb 20, 2017

I just tried to build libcdr 0.1.2 on the "MSYS2 MSYS" shell using makepkg-mingw -sL

However the build consistently fails without obvious error.
Possible issue: I tried executing the command to link cdr2raw.exe manually. There's no error output but also no executable created!

Making all in raw
make[4]: Verzeichnis „/c/mingw-w64-libcdr/src/build-x86_64-w64-mingw32/src/conv/raw“ wird betreten
x86_64-w64-mingw32-g++ -DHAVE_CONFIG_H -I. -I../../../../libcdr-0.1.2/src/conv/raw -I../../..   -D_FORTIFY_SOURCE=2 -D__USE_MINGW_ANSI_STDIO=1 -I../../../../libcdr-0.1.2/inc -IC:/msys64/mingw64/include/librevenge-0.0 -IC:/msys64/mingw64/include/librevenge-0.0 -IC:/msys64/mingw64/include/librevenge-0.0 -DNDEBUG -march=x86-64 -mtune=generic -O2 -pipe -Werror -mms-bitfields -Wall -Wextra -Wshadow -pedantic -MT cdr2raw.o -MD -MP -MF .deps/cdr2raw.Tpo -c -o cdr2raw.o ../../../../libcdr-0.1.2/src/conv/raw/cdr2raw.cpp
mv -f .deps/cdr2raw.Tpo .deps/cdr2raw.Po
chmod +x ../../../../libcdr-0.1.2/build/win32/*compile-resource
WINDRES=windres ../../../../libcdr-0.1.2/build/win32/lt-compile-resource cdr2raw.rc cdr2raw-win32res.lo
Using zero as build number
/bin/sh ../../../libtool  --tag=CXX   --mode=link x86_64-w64-mingw32-g++ -I../../../../libcdr-0.1.2/inc -IC:/msys64/mingw64/include/librevenge-0.0 -IC:/msys64/mingw64/include/librevenge-0.0 -IC:/msys64/mingw64/include/librevenge-0.0 -DNDEBUG -march=x86-64 -mtune=generic -O2 -pipe -Werror -mms-bitfields -Wall -Wextra -Wshadow -pedantic  -pipe -o cdr2raw.exe cdr2raw.o ../../lib/libcdr-0.1.la -LC:/msys64/mingw64/lib -lrevenge-generators-0.0 -lrevenge-0.0 -LC:/msys64/mingw64/lib -lrevenge-0.0 -LC:/msys64/mingw64/lib -lrevenge-stream-0.0 cdr2raw-win32res.lo  
libtool: link: x86_64-w64-mingw32-g++ -I../../../../libcdr-0.1.2/inc -IC:/msys64/mingw64/include/librevenge-0.0 -IC:/msys64/mingw64/include/librevenge-0.0 -IC:/msys64/mingw64/include/librevenge-0.0 -DNDEBUG -march=x86-64 -mtune=generic -O2 -pipe -Werror -mms-bitfields -Wall -Wextra -Wshadow -pedantic -pipe -o .libs/cdr2raw.exe cdr2raw.o .libs/cdr2raw-win32res.o  ../../lib/.libs/libcdr-0.1.dll.a -LC:/msys64/mingw64/lib -llcms2 -lz -licuin -licuuc -licudt -lrevenge-generators-0.0 -lrevenge-0.0 -lrevenge-stream-0.0  -L/mingw64/lib
collect2.exe: error: ld returned 5 exit status
make[4]: *** [Makefile:468: cdr2raw.exe] Fehler 1
make[4]: Verzeichnis „/c/mingw-w64-libcdr/src/build-x86_64-w64-mingw32/src/conv/raw“ wird verlassen
make[3]: *** [Makefile:389: all-recursive] Fehler 1
make[3]: Verzeichnis „/c/mingw-w64-libcdr/src/build-x86_64-w64-mingw32/src/conv“ wird verlassen
make[2]: *** [Makefile:391: all-recursive] Fehler 1
make[2]: Verzeichnis „/c/mingw-w64-libcdr/src/build-x86_64-w64-mingw32/src“ wird verlassen
make[1]: *** [Makefile:505: all-recursive] Fehler 1
make[1]: Verzeichnis „/c/mingw-w64-libcdr/src/build-x86_64-w64-mingw32“ wird verlassen
make: *** [Makefile:412: all] Fehler 2
@Alexpux
Copy link
Member

Alexpux commented Feb 20, 2017

I'm successfully build libcdr-0.1.3 today without issues.

@mati865
Copy link
Collaborator

mati865 commented Feb 20, 2017

This log is incomplete and missing the error. Upload full log (you can add .txt and drag and drop into github comment).

@Ede123
Copy link
Contributor Author

Ede123 commented Feb 20, 2017

Well here's the full log:
mingw-w64-libcdr-0.1.2-2-x86_64-build.txt
I can't find anything more relevant in there, though...

@Ede123
Copy link
Contributor Author

Ede123 commented Feb 20, 2017

Good news:
libcdr 0.1.3 in fact builds fine on my system (without any change).

Seems I should have gone for the update right away (that's why I wanted to build it). As it was my first package build with MSYS2 though, I wanted to start with something "tested" first.

@Ede123
Copy link
Contributor Author

Ede123 commented Feb 20, 2017

Bad news:
Same thing now seems to be happening when building libvisio-1.5.0 (fails to link vsd2raw.exe)

@Alexpux
Copy link
Member

Alexpux commented Feb 20, 2017

Maybe you first need rebuild some dependencies of libvisio.

@Ede123
Copy link
Contributor Author

Ede123 commented Feb 20, 2017

I'll try (only new dependency compared to libcdr is libxml2).

Strange thing is that it works just fine if I compile it inside a "MSYS2 MinGW 64-bit" shell

@Ede123
Copy link
Contributor Author

Ede123 commented Feb 20, 2017

Strange thing is that it works just fine if I compile it inside a "MSYS2 MinGW 64-bit" shell

I have to use makepkg, though. When using makepkg-mingw the build will still fail.

Could it be that something goes wrong when setting up the environment?

@Alexpux
Copy link
Member

Alexpux commented Feb 20, 2017

makepkg is only for building MSYS2 packages.
For MINGW packages you must use makepkg-mingw. If you build both architectures then use makepkg-mingw from MSYS2 shell, not MINGW one

@Ede123
Copy link
Contributor Author

Ede123 commented Feb 20, 2017

OK, sorry, I assumed makepkg executed from a mingw64 shell would be equivalent with executing makepkg-mingw from an MSYS shell with MINGW_INSTALLS=mingw64 set.

Now I looked what makepkg-mingw is doing internally, and executed makepkg_mingw64.conf on a mingw64 shell. I then executed the exact ./configure command specified in my PKGBUILD file and ran make. Again, it worked!

@Ede123
Copy link
Contributor Author

Ede123 commented Feb 21, 2017

Oh hell, this was a tough one...

I finally found the source of the problem: msys2/MSYS2-packages#454
Renaming the default-manifest.o allowed me to compile without issues.

Seems I wasn't too stupid after all... (even though you almost made it sound like it 😉 )

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

Successfully merging a pull request may close this issue.

3 participants