Page 2 of 3
Re: Compiling wxWidgets 3.0.4 on Cygwin
Posted: Fri Jul 12, 2019 4:42 pm
by stahta01
What OpenGL libs did you install in Cygwin?
Edit: I am trying mesa library
Re: Compiling wxWidgets 3.0.4 on Cygwin
Posted: Fri Jul 12, 2019 6:13 pm
by hamishmb
Are you sure you need X11? Are you sure this worked with wx 3.0.3? If yes, you may want to open a ticket at
http://trac.wxwidgets.org
This is probably a configuration that hardly anyone ever tests, so it's possible that it becomes broken unnoticed.
Yeah, there is an official Cygwin package for 3.0.3 that was built with --with-x11, and I built it too to make sure I'd (at least sort of) set things up right. I'll have a look at doing that, but I'm thinking it's probably something with my configuration to be honest. The cygwin-provided package used a bunch of patches to build, but they don't seem to help me with wxwidgets-3.0.4.
I can live with bugs, I just want to get it built to be honest. I've been trying on and off for a while now.
My output is:
Code: Select all
Configured wxWidgets 3.0.4 for `i686-pc-cygwin'
Which GUI toolkit should wxWidgets use? x11
Should wxWidgets be compiled into single library? no
Should wxWidgets be linked as a shared library? yes
Should wxWidgets support Unicode? yes (using wchar_t)
What level of wxWidgets compatibility should be enabled?
wxWidgets 2.6 no
wxWidgets 2.8 yes
Which libraries should wxWidgets use?
STL no
jpeg sys
png sys
regex builtin
tiff sys
xpm yes
zlib sys
expat sys
libmspack no
sdl no
As you can see, I'm doing 32-bit, which might not be helping. I am also using mesa. Are you having more luck with the 64-bit version of Cygwin?
Re: Compiling wxWidgets 3.0.4 on Cygwin
Posted: Sat Jul 13, 2019 12:55 am
by stahta01
official Cygwin package for 3.0.3 that was built with --with-x11
False, there is a official Cygwin package for 3.0.3 that was built with GTK that uses x11.
Tim S.
Re: Compiling wxWidgets 3.0.4 on Cygwin
Posted: Sat Jul 13, 2019 1:26 am
by stahta01
Cygwin 64 bit had build issues for wxX11; I suggest you try wxGTK instead.
No idea whether 64 bit or 32 bit would be better.
Edit: Added example build command.
Edit2: Add --disable-precomp-headers
Code: Select all
../configure --with-gtk --enable-debug --enable-unicode --with-opengl --disable-precomp-headers
Edit: Add packages that I think are likely needed
Code: Select all
libGLU-devel
mesa
make
gcc-g++
libgtk2.0-devel
Tim S.
Re: Compiling wxWidgets 3.0.4 on Cygwin
Posted: Sat Jul 13, 2019 3:33 am
by stahta01
Looking at Cygwin headers "sys/features.h" and "pthread.h" I think that _XOPEN_SOURCE=500 is needed.
Edit: Add old wiki page that needs updated; if, I can find out how to build wxWidgets under Cygwin.
https://wiki.wxwidgets.org/Cygwin
Tim S.
Re: Compiling wxWidgets 3.0.4 on Cygwin
Posted: Sat Jul 13, 2019 6:45 am
by stahta01
Code: Select all
CPPFLAGS='-D_XOPEN_SOURCE=500 -D_DEFAULT_SOURCE' ../configure --with-gtk --enable-debug --enable-unicode --with-opengl
I think I have gotten your problem fixed; too tired to test it to be sure.
The above should work with "--with-gtk" replaced with "--with-x11"
Tim S.
Re: Compiling wxWidgets 3.0.4 on Cygwin
Posted: Sat Jul 13, 2019 10:37 am
by hamishmb
Hmm, I checked the arguments in the cygport file, but yes I want to build against GTK anyway, so that's cool. I sort of assumed that --with-gtk implies --with-x11, but maybe not.
I can't check this right now, but it sounds promising! Thank you so much, I will check when I get home
Re: Compiling wxWidgets 3.0.4 on Cygwin
Posted: Sat Jul 13, 2019 4:58 pm
by stahta01
wxWidgets git master needed the below command to build wx base library; still building core and the other libs.
Edit: Just error-ed out with new error building wx core lib. The error looks to be 64 bit only issue.
Code: Select all
CPPFLAGS='-D_GNU_SOURCE' \
../configure --with-gtk --enable-debug --enable-unicode --with-opengl
Re: Compiling wxWidgets 3.0.4 on Cygwin
Posted: Sat Jul 13, 2019 5:12 pm
by doublemax
Maybe it's time to ask on the mailing list / Google group where you can reach the core developers:
https://groups.google.com/forum/#!forum/wx-users
Re: Compiling wxWidgets 3.0.4 on Cygwin
Posted: Sat Jul 13, 2019 5:15 pm
by stahta01
Noop, I would not ask there; till I fail to make progress.
Already got the OP fix and the same fix works on wx 3.0 git branch.
Edit: I am one of the few that does msys2 pull requests to wx git master; so, I might be the best person to fix this issue on building Cygwin. Unless, an Cygwin user steps up.
Edit2: And so far all issues have been Cygwin instead of wxWidgets caused.
Tim S.
Re: Compiling wxWidgets 3.0.4 on Cygwin
Posted: Sat Jul 13, 2019 9:28 pm
by hamishmb
Looks like it worked - successfully compiled. I will try the demos when I have some more time
. I'll probably stick to 32-bit builds, because they'll work on 64-bit Windows, but not vice-versa.
Thank you so much, I've been messing with this for a really long time and you figured it out really quickly
Re: Compiling wxWidgets 3.0.4 on Cygwin
Posted: Sun Jul 14, 2019 12:19 am
by stahta01
According to wxWidgets docs that I have read in the past 24 hour.
Cygwin (Native GCC) should be able to build three wx toolkits
wxGTK
wxX11
wxMotif
Once, I get all three of them to build using Cygwin 32 bit.
I will create the updated documentation and do a Pull Request.
By then, I will likely know if it is a real wxWidgets 3.1.x 64 bit build issue and will likely report that problem as part of the PR for Cygwin documentation.
Tim S.
Re: Compiling wxWidgets 3.0.4 on Cygwin
Posted: Mon Jul 15, 2019 11:12 pm
by stahta01
If you are still trying to build wxX11 see
https://trac.wxwidgets.org/ticket/16813
Edit adding configure option --enable-monolithic should avoid this build error.
Tim S.
Re: Compiling wxWidgets 3.0.4 on Cygwin
Posted: Tue Aug 06, 2019 8:30 pm
by hamishmb
Excellent, thanks again for all the help. This has been on the backburner for a while, but hopefully I'll have some time to work on this again soon.
It did build for GTK2 and GTK3 though, so I think you've resolved my problem
Re: Compiling wxWidgets 3.0.4 on Cygwin
Posted: Thu Sep 05, 2019 10:18 am
by hamishmb
So, I've now had some time to mess about with this again. I was just getting to make a cygport file, but after the upgrade I just did to cygwin, the openGL libraries aren't being found any more. I have no idea why, because they're all still there, but the build options that were working before have now stopped working.
It seems okay if I disable openGL. Are there any repercussions for doing that?
Hamish