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

Fix Poco only building "Basic Edition" #2553

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Krzmbrzl
Copy link

The build script only dowloaded the sources of Poco's "Basic Edition"
which only contains a few of its components.
This commit makes it pull the complete Poco library in order to make all
of it available under MXE.

The PageCompiler and Data/ODBC module had to be disabled though as they
don't build successfully.

Fixes #2552

@davidebeatrici
Copy link

Failed to build package poco for target x86_64-w64-mingw32.static!
------------------------------------------------------------
Makefile:243: recipe for target 'Data-libexec' failed
make[2]: *** [Data-libexec] Error 2
make[2]: Leaving directory '/usr/lib/mxe/tmp-poco-x86_64-w64-mingw32.static/poco-1.9.4-all'
Makefile:815: recipe for target 'build-only-poco_x86_64-w64-mingw32.static' failed
make[1]: *** [build-only-poco_x86_64-w64-mingw32.static] Error 2
make[1]: Leaving directory '/usr/lib/mxe'
real	1m48,643s
user	8m35,890s
sys	1m10,411s
------------------------------------------------------------
[log]      /usr/lib/mxe/log/poco_x86_64-w64-mingw32.static
** Compiling src/StatementImpl.cpp (debug, static)
x86_64-w64-mingw32.static-g++ -Iinclude -I/usr/lib/mxe/tmp-poco-x86_64-w64-mingw32.static/poco-1.9.4-all/CppUnit/include -I/usr/lib/mxe/tmp-poco-x86_64-w64-mingw32.static/poco-1.9.4-all/CppUnit/WinTestRunner/include -I/usr/lib/mxe/tmp-poco-x86_64-w64-mingw32.static/poco-1.9.4-all/Foundation/include -I/usr/lib/mxe/tmp-poco-x86_64-w64-mingw32.static/poco-1.9.4-all/Encodings/include -I/usr/lib/mxe/tmp-poco-x86_64-w64-mingw32.static/poco-1.9.4-all/XML/include -I/usr/lib/mxe/tmp-poco-x86_64-w64-mingw32.static/poco-1.9.4-all/JSON/include -I/usr/lib/mxe/tmp-poco-x86_64-w64-mingw32.static/poco-1.9.4-all/Util/include -I/usr/lib/mxe/tmp-poco-x86_64-w64-mingw32.static/poco-1.9.4-all/Net/include -I/usr/lib/mxe/tmp-poco-x86_64-w64-mingw32.static/poco-1.9.4-all/Crypto/include -I/usr/lib/mxe/tmp-poco-x86_64-w64-mingw32.static/poco-1.9.4-all/NetSSL_OpenSSL/include -I/usr/lib/mxe/tmp-poco-x86_64-w64-mingw32.static/poco-1.9.4-all/Data/include -I/usr/lib/mxe/tmp-poco-x86_64-w64-mingw32.static/poco-1.9.4-all/Data/SQLite/include -I/usr/lib/mxe/tmp-poco-x86_64-w64-mingw32.static/poco-1.9.4-all/Data/ODBC/include -I/usr/lib/mxe/tmp-poco-x86_64-w64-mingw32.static/poco-1.9.4-all/Data/MySQL/include -I/usr/lib/mxe/tmp-poco-x86_64-w64-mingw32.static/poco-1.9.4-all/Zip/include -I/usr/lib/mxe/tmp-poco-x86_64-w64-mingw32.static/poco-1.9.4-all/PageCompiler/include -I/usr/lib/mxe/tmp-poco-x86_64-w64-mingw32.static/poco-1.9.4-all/PageCompiler/File2Page/include -I/usr/lib/mxe/tmp-poco-x86_64-w64-mingw32.static/poco-1.9.4-all/MongoDB/include -I/usr/lib/mxe/tmp-poco-x86_64-w64-mingw32.static/poco-1.9.4-all/Redis/include    -DPOCO_BUILD_HOST='"'ubuntu'"' -DPOCO_TARGET_OSNAME='"'MinGW'"' -DPOCO_TARGET_OSARCH='"'i686'"' -DPOCO_UNBUNDLED -D_WIN32 -DMINGW32 -DWINVER=0x501 -DPOCO_NO_FPENVIRONMENT -DPCRE_STATIC -DPOCO_THREAD_STACK_SIZE  -g -D_DEBUG  -c src/StatementImpl.cpp -o /usr/lib/mxe/tmp-poco-x86_64-w64-mingw32.static/poco-1.9.4-all/Data/obj/MinGW/i686/debug_static/StatementImpl.o
/usr/lib/mxe/usr/bin/x86_64-w64-mingw32.static-as: /usr/lib/mxe/tmp-poco-x86_64-w64-mingw32.static/poco-1.9.4-all/Data/obj/MinGW/i686/debug_static/StatementImpl.o: too many sections (33622)
/tmp/ccSInIui.s: Assembler messages:
/tmp/ccSInIui.s: Fatal error: can't write 277 bytes to section .text of /usr/lib/mxe/tmp-poco-x86_64-w64-mingw32.static/poco-1.9.4-all/Data/obj/MinGW/i686/debug_static/StatementImpl.o because: 'File too big'
/usr/lib/mxe/usr/bin/x86_64-w64-mingw32.static-as: /usr/lib/mxe/tmp-poco-x86_64-w64-mingw32.static/poco-1.9.4-all/Data/obj/MinGW/i686/debug_static/StatementImpl.o: too many sections (33622)
/tmp/ccSInIui.s: Fatal error: can't close /usr/lib/mxe/tmp-poco-x86_64-w64-mingw32.static/poco-1.9.4-all/Data/obj/MinGW/i686/debug_static/StatementImpl.o: File too big
/usr/lib/mxe/tmp-poco-x86_64-w64-mingw32.static/poco-1.9.4-all/build/rules/compile:40: recipe for target '/usr/lib/mxe/tmp-poco-x86_64-w64-mingw32.static/poco-1.9.4-all/Data/obj/MinGW/i686/debug_static/StatementImpl.o' failed
make[3]: *** [/usr/lib/mxe/tmp-poco-x86_64-w64-mingw32.static/poco-1.9.4-all/Data/obj/MinGW/i686/debug_static/StatementImpl.o] Error 1

pocoproject/poco#2690

@Krzmbrzl
Copy link
Author

Krzmbrzl commented Aug 21, 2020

should be fixed now.
Nope, it's not. I'll have to dig in some more

Ref: https://digitalkarabela.com/mingw-w64-how-to-fix-file-too-big-too-many-sections/

@Krzmbrzl Krzmbrzl force-pushed the revamp-poco branch 2 times, most recently from 4b1e6ef to 82eba2b Compare August 21, 2020 09:04
The build script only dowloaded the sources of Poco's "Basic Edition"
which only contains a few of its components.
This commit makes it pull the complete Poco library in order to make all
of it available under MXE.

The PageCompiler and Data/ODBC module had to be disabled though as they
don't build successfully.

Fixes mxe#2552
@Krzmbrzl
Copy link
Author

Krzmbrzl commented Aug 21, 2020

Okay it turned out that my comments broke the code. Turns out suppressing newlines with \ and comments in between the lines doesn't work well together 🤦

Anyways: It's working now 👍

@Krzmbrzl
Copy link
Author

I think that in theory the following PRs that are currently only part of the develop branch of Poco and thus not part of the releases enable MinGW support for the cmake system:

Thus it might be possible to use the changes from these PRs as a patch and then switch to using cmake instead of autoconf for building Poco. This should have the advantage that the resulting packages should then also generate the cmake config files that'll facilitate cmake integration ☝️
Not sure yet though whether I'll have the time and motivation to do it. I wanted to point this out in any case though so that someone else might be able to do it, if needed.

@Krzmbrzl
Copy link
Author

@mabrand just to make sure there is no misunderstanding: This PR is done. It seems to be working and I don't have any intention of changing it anymore. My last comment was only meant to be a reference in case someone in the future might want to pick it up.

@mabrand
Copy link
Member

mabrand commented Sep 25, 2020

The build fails for me. It looks like it's picking up the host system's mysql.h.

In file included from /usr/include/mysql/mysql.h:80,
from include/Poco/Data/MySQL/Binder.h:24,
from src/Binder.cpp:15:'/usr/include/mysql/mysql_com.h:1034:10: fatal error: mysql/udf_registration_types.h: No such file or directory
1034 | #include "mysql/udf_registration_types.h"

@Krzmbrzl
Copy link
Author

Oh that's interesting. Do you have any idea how the include path can be set in such a way that it'll include MXE's headers if present and only after that consider system headers? 🤔

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 this pull request may close these issues.

Poco package only uses "Basic Edition"
3 participants