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

Poco package only uses "Basic Edition" #2552

Open
Krzmbrzl opened this issue Aug 18, 2020 · 4 comments · May be fixed by #2553
Open

Poco package only uses "Basic Edition" #2552

Krzmbrzl opened this issue Aug 18, 2020 · 4 comments · May be fixed by #2553

Comments

@Krzmbrzl
Copy link

From their website:

The Basic Edition only contains the Foundation, JSON, XML, Util and Net libraries, but does not require any external dependencies.

Thus all other components are not built (for my case in particular Zip is the essential missing one).

This happens because the version is set to

$(PKG)_VERSION := 1.9.4

Thus the script will try to download poco-1.9.4.tar.gz which sadly is the Basic Edition of Poco. The complete Poco package is named poco-1.9.4-all.tar.gz (Note the -all postfix)

I am currently testing whether simply adding -all to the version is enough to build all of Poco. If so, I'll submit a PR to fix this.

@Krzmbrzl
Copy link
Author

Krzmbrzl commented Aug 18, 2020

Okay it seems as if it isn't quite that easy:

Failed to build package poco for target i686-w64-mingw32.static!
------------------------------------------------------------
Makefile:301: recipe for target 'PageCompiler-libexec' failed
make[2]: *** [PageCompiler-libexec] Error 2
make[2]: Leaving directory '/home/krzmbrzl/Documents/Git/mxe/tmp-poco-i686-w64-mingw32.static/poco-1.9.4-all'
Makefile:827: recipe for target 'build-only-poco_i686-w64-mingw32.static' failed
make[1]: *** [build-only-poco_i686-w64-mingw32.static] Error 2
make[1]: Leaving directory '/home/krzmbrzl/Documents/Git/mxe'
real	6m50,870s
user	10m59,838s
sys	2m26,648s

I'll have to look into this some more.

Can someone tell me how I can see the actual error message that caused the failure?
Scratch that - it's in the log subdir 🤦

The error is

i686-w64-mingw32.static-g++ -Wl,--allow-multiple-definition -DPOCO_BUILD_HOST='"'ubuntu1804'"' -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 -static -o /home/krzmbrzl/Documents/Git/mxe/tmp-poco-i686-w64-mingw32.static/poco-1.9.4-all/PageCompiler/bin/MinGW/i686/static/cpspcd.exe /home/krzmbrzl/Documents/Git/mxe/tmp-poco-i686-w64-mingw32.static/poco-1.9.4-all/PageCompiler/obj/MinGW/i686/debug_static/Page.o /home/krzmbrzl/Documents/Git/mxe/tmp-poco-i686-w64-mingw32.static/poco-1.9.4-all/PageCompiler/obj/MinGW/i686/debug_static/PageReader.o /home/krzmbrzl/Documents/Git/mxe/tmp-poco-i686-w64-mingw32.static/poco-1.9.4-all/PageCompiler/obj/MinGW/i686/debug_static/CodeWriter.o /home/krzmbrzl/Documents/Git/mxe/tmp-poco-i686-w64-mingw32.static/poco-1.9.4-all/PageCompiler/obj/MinGW/i686/debug_static/ApacheCodeWriter.o /home/krzmbrzl/Documents/Git/mxe/tmp-poco-i686-w64-mingw32.static/poco-1.9.4-all/PageCompiler/obj/MinGW/i686/debug_static/OSPCodeWriter.o /home/krzmbrzl/Documents/Git/mxe/tmp-poco-i686-w64-mingw32.static/poco-1.9.4-all/PageCompiler/obj/MinGW/i686/debug_static/PageCompiler.o -L/home/krzmbrzl/Documents/Git/mxe/tmp-poco-i686-w64-mingw32.static/poco-1.9.4-all/lib/MinGW/i686   -lPocoNetd -lPocoUtild -lPocoXMLd -lPocoJSONd -lPocoFoundationd  -liphlpapi -lssl -lcrypto -lws2_32 -lz -lpcre -lexpat
/home/krzmbrzl/Documents/Git/mxe/usr/lib/gcc/i686-w64-mingw32.static/5.5.0/../../../../i686-w64-mingw32.static/lib/../lib/libmingw32.a(lib32_libmingw32_a-crt0_c.o): In function `main':
/home/krzmbrzl/Documents/Git/mxe/tmp-gcc-i686-w64-mingw32.static/gcc-5.5.0.build_.crt/../gcc-5.5.0.build_/mingw-w64-v7.0.0/mingw-w64-crt/crt/crt0_c.c:18: undefined reference to `WinMain@16'
collect2: error: ld returned 1 exit status
/home/krzmbrzl/Documents/Git/mxe/tmp-poco-i686-w64-mingw32.static/poco-1.9.4-all/build/rules/exec:42: recipe for target '/home/krzmbrzl/Documents/Git/mxe/tmp-poco-i686-w64-mingw32.static/poco-1.9.4-all/PageCompiler/bin/MinGW/i686/static/cpspcd.exe' failed
make[3]: *** [/home/krzmbrzl/Documents/Git/mxe/tmp-poco-i686-w64-mingw32.static/poco-1.9.4-all/PageCompiler/bin/MinGW/i686/static/cpspcd.exe] Error 1
make[3]: Leaving directory '/home/krzmbrzl/Documents/Git/mxe/tmp-poco-i686-w64-mingw32.static/poco-1.9.4-all/PageCompiler'
Makefile:301: recipe for target 'PageCompiler-libexec' failed
make[2]: *** [PageCompiler-libexec] Error 2

Looks like it is missing a WinMain function... @davidebeatrici don't we have such a thing in our Mumble code as well? WHat do we use it for?

@davidebeatrici
Copy link

We have our own entry point called MumbleMain(), which is defined and exported when we build as static (loader + DLL).

About WinMain(): https://docs.microsoft.com/en-us/windows/win32/learnwin32/winmain--the-application-entry-point

The Makefile for the target is here: https://github.com/pocoproject/poco/blob/master/PageCompiler/Makefile

This is the configuration used by MXE: https://github.com/pocoproject/poco/blob/master/build/config/MinGW-CrossEnv

For now I didn't find anything that tells MinGW to search for WinMain(). It's possible it doesn't find main() and falls back to the other entry point.

I would try to build with CMake.

@Krzmbrzl
Copy link
Author

Yeah that might be worth a try. I'll give it a shot tomorrow 👍

Krzmbrzl added a commit to Krzmbrzl/mxe that referenced this issue Aug 19, 2020
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 added a commit to Krzmbrzl/mxe that referenced this issue Aug 19, 2020
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 Krzmbrzl linked a pull request Aug 19, 2020 that will close this issue
@Krzmbrzl
Copy link
Author

Turns out that the patches that enable cmake build on MinGW are still in the development-experimental branch of Poco. And since I don't want to start patching a lot (and building off an experimental branch is not a good option either) I stayed with autoconf. I simply disabled the PageCompiler since it seems that's not a library anyways 🤷

Krzmbrzl added a commit to Krzmbrzl/mxe that referenced this issue Aug 21, 2020
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 added a commit to Krzmbrzl/mxe that referenced this issue Aug 21, 2020
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 added a commit to Krzmbrzl/mxe that referenced this issue Aug 21, 2020
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 added a commit to Krzmbrzl/mxe that referenced this issue Aug 21, 2020
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
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.

2 participants