Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 46420 - new ebuild file for wxWidgets Library cross-compiled using Xmingw
Summary: new ebuild file for wxWidgets Library cross-compiled using Xmingw
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High enhancement
Assignee: Gentoo wxWidgets project
URL:
Whiteboard:
Keywords: PMASKED
Depends on:
Blocks: 46942
  Show dependency tree
 
Reported: 2004-03-31 16:13 UTC by Adrian Smarzewski
Modified: 2006-10-31 05:10 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ebuild file for cross-compiled wxWidgets-2.4.2 (xmingw-wxWidgets-2.4.2.ebuild,960 bytes, text/plain)
2004-03-31 16:16 UTC, Adrian Smarzewski
Details
new, fixed version (xmingw-wxWidgets-2.4.2.ebuild,1.22 KB, text/plain)
2004-09-30 02:18 UTC, Adrian Smarzewski
Details
updated ebuild (xmingw-wxWidgets-2.4.2.ebuild,1.09 KB, text/plain)
2005-02-04 07:43 UTC, Mateusz Klatt
Details
minor improvements (CFLAGS, window.h) (xmingw-wxwidgets-2.4.2.ebuild,1.31 KB, text/plain)
2005-02-10 13:24 UTC, Dennis Frommknecht
Details
Autoconf'ed "hello world" with cross compile (helloworldapp-0.1.tar.gz,282.06 KB, application/gzip)
2005-04-14 02:59 UTC, Natanael Copa
Details
ebuild for wxWidgets 2.6.3 (wx-xmingw-2.6.3.ebuild,2.95 KB, text/plain)
2006-05-02 11:24 UTC, Adrian Smarzewski
Details
ebuild for wxWidgets 2.6.3 (wx-xmingw-2.6.3.ebuild,2.95 KB, text/plain)
2006-05-02 11:34 UTC, Adrian Smarzewski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Smarzewski 2004-03-31 16:13:08 UTC
This is the ebuild file for Win32 version of popular cross-platform wxWidgets
library cross-compiled using Xmingw. Now you can cross-compile GUI applications
for Win32 platforms.


Reproducible: Always
Steps to Reproduce:
Comment 1 Adrian Smarzewski 2004-03-31 16:16:48 UTC
Created attachment 28473 [details]
ebuild file for cross-compiled wxWidgets-2.4.2
Comment 2 Radek Podgorny 2004-08-02 00:38:27 UTC
I don't want to be rude but is anyone working on this? Our company would like to start compiling all wx stuff under linux asap and this would help me a lot! Thanks...
Comment 3 Rob Cakebread (RETIRED) gentoo-dev 2004-08-02 07:40:59 UTC
I have not worked on it. Did you try it? If either of you can tell me how I can test it, I'll take a look at it. Also, the copyright would need to be assigned to  "Gentoo Foundation" in order to be put in portage.
Comment 4 Adrian Smarzewski 2004-08-09 10:00:26 UTC
So where can I put my name? You can test it cross-compiling some wxwidgets-based application and run it under win32 (or wine).
Comment 5 Rob Cakebread (RETIRED) gentoo-dev 2004-08-09 13:24:50 UTC
I looked in the documentation that comes with it and searched wxwidgets' site, but I still don't know exactly how to compile anything so I can test it on win32.
If you can give me a clue on how to compile it, I'll test it and put it in portage if it works.
Comment 6 Adrian Smarzewski 2004-08-24 02:18:18 UTC
Look here: http://bugs.gentoo.org/show_bug.cgi?id=46942
wxActiveX depends on this ebuild, so it is itself an example ;)
Comment 7 Rob Cakebread (RETIRED) gentoo-dev 2004-08-24 10:34:22 UTC
Adrian can you give us the commandline you use with gcc to cross-compile something so I can test it on a win32 system please? I've got no idea how to test it otherwise. Thanks.
Comment 8 Adrian Smarzewski 2004-08-24 12:42:32 UTC
Sample makefile (from existing commercial product):

XMINGW = /opt/xmingw/bin
CC = $(XMINGW)/i386-mingw32msvc-g++
WINDRES = $(XMINGW)/i386-mingw32msvc-windres
STRIP = $(XMINGW)/i386-mingw32msvc-strip
WXDIR = /opt/xmingw/wxWidgets
WXWIN_CFLAGS = `$(WXDIR)/bin/wx-config --cxxflags`
INFO1_CFLAGS = -I../../Info1Base -I../../Info1Gui -I../../Info1Sql -I../../Info1SqlGui
LFLAGS = $(WXWIN_LFLAGS)
CFLAGS = $(INFO1_CFLAGS) $(WXWIN_CFLAGS)

dbtools.exe: dbtools.o main_dialog.o dbtools_res.o
	$(CC) -o dbtools.exe dbtools.o main_dialog.o dbtools_res.o \
		`$(WXDIR)/bin/wx-config --libs`
	$(STRIP) dbtools.exe

dbtools_res.o: dbtools.rc
	$(WINDRES) -o dbtools_res.o -i dbtools.rc

dbtools.o: dbtools.cpp
	$(CC) -c $(CFLAGS) dbtools.cpp
	
main_dialog.o: main_dialog.cpp
	$(CC) -c $(CFLAGS) main_dialog.cpp
Comment 9 Radek Podgorny 2004-09-23 06:23:45 UTC
Just a few quick notes why this ebuild doesn't work:

1) It should depend on xmingw-w32api
2) It complains it can't find windows.h even if xmingw-w32api is installed
Comment 10 Adrian Smarzewski 2004-09-30 02:18:50 UTC
Created attachment 40760 [details]
new, fixed version

please, try new, fixed version.
one problem still exist. you must run /opt/xmingw/bin/ranlib
on wxWidgets .a file after installation.
Comment 11 Adrian Smarzewski 2004-09-30 02:19:31 UTC
Comment on attachment 40760 [details]
new, fixed version

fixing mime type
Comment 12 Mateusz Klatt 2005-02-04 07:43:03 UTC
Created attachment 50341 [details]
updated ebuild

With this ranlib is working, added some USE to be compatibile with devpaks.org
(unselect all but _leave selected_ threads (and mayby opengl))
Comment 13 Dennis Frommknecht 2005-02-10 13:24:23 UTC
Created attachment 50951 [details]
minor improvements (CFLAGS, window.h)

i also had some issues with a missing window.h file and also some errors caused
by C(XX)FLAGS and LDFLAGS from make.conf. So i modified the ebuild a litte bit
and now it works for me, even if i don't know why i have to export some
variables. but i don't care as long as it works...
Comment 14 Natanael Copa 2005-04-13 14:31:52 UTC
I get this error:

In file included from ./include/wx/string.h:51,
                 from ./include/wx/memory.h:20,
                 from ./include/wx/object.h:25,
                 from ./include/wx/event.h:20,
                 from ./include/wx/window.h:23,
                 from ./include/wx/toplevel.h:25,
                 from ./include/wx/frame.h:23,
                 from ./src/msw/app.cpp:32:
/opt/xmingw/lib/gcc/i386-mingw32msvc/3.4.2/../../../../i386-mingw32msvc/include/stdio.h:402: error: `off64_t' has not been declared
/opt/xmingw/lib/gcc/i386-mingw32msvc/3.4.2/../../../../i386-mingw32msvc/include/stdio.h:409: error: expected init-declarator before "ftello64"
/opt/xmingw/lib/gcc/i386-mingw32msvc/3.4.2/../../../../i386-mingw32msvc/include/stdio.h:409: error: expected `,' or `;' before "ftello64"
make: *** [accel.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [app.o] Error 1

I tried to find a declaration for off64_t with: grep -R off64_t /opt/xmingw but it looks like it is completely missing here.

Any ideas?
Comment 15 Natanael Copa 2005-04-14 02:52:11 UTC
I needed to emerge xmingw-w32api before the compiler to get c++ support. It works like a charm now :)
Comment 16 Natanael Copa 2005-04-14 02:59:01 UTC
Created attachment 56241 [details]
Autoconf'ed "hello world" with cross compile

Here is a autoconfed hello world app. It includes a cross-build.sh script
showing how to build it with xmingw. 

BTW. does anyone knows how to link mingwm10.dll statically into the hello.exe
app?
Comment 17 John Steele Scott 2005-04-14 03:21:07 UTC
I don't know about linking it in, but where I work we just compile wxwidgets without threading, then you don't need the mingw runtime at all.
Comment 18 Adrian Smarzewski 2005-05-10 20:54:07 UTC
Please add this ebuild to the portage or tell us what to fix or just tell that it won't be added.
Comment 19 Rob Cakebread (RETIRED) gentoo-dev 2005-05-11 17:34:56 UTC
Sorry Adrian, I've been trying to get other developers to take care of wx* bugs for a few months, but nobody else has joined in so far. I'm compiling it now and will test it tonight.

A couple questions:
Is it necessary to install it in /opt? We reserve that for binary-only packages.
Has this been tested with wxWidgets 2.4.2 only or 2.6.0 also?

As for the copyright, it should have the same header as all other ebuilds in portage. You'll be credited in the ChangeLog as the author.
Comment 20 Adrian Smarzewski 2005-05-11 18:07:14 UTC
prefix: /opt following xmingw packages! any other ideas?
version: 2.4 only
copyright: no problem. will you change it committing ebuild or should I upload new version?
Comment 21 Rob Cakebread (RETIRED) gentoo-dev 2005-05-11 18:28:21 UTC
I can change the header, no problem there. I have no idea why the xming stuff is in /opt but I'll try to find out why. There is the advantage of having it in /opt though, so you can have wxGTK installed without file collisions.

Anyone have a ideas for a package name for this?
Comment 22 Rob Cakebread (RETIRED) gentoo-dev 2005-05-17 20:48:05 UTC
I need help, xmingw experts.

I can't get this to compile. I'm using:
xmingw-w32api-3.1
xmingw-runtime-3.5
xmingw-gcc-3.4.2
xmingw-binutils-2.15.90.0.2 
wxAll-2.4.2

checking for gcc... i386-mingw32msvc-gcc
checking whether the C compiler (i386-mingw32msvc-gcc
-I/opt/xmingw/i386-mingw32msvc/include ) works... yes
checking whether the C compiler (i386-mingw32msvc-gcc
-I/opt/xmingw/i386-mingw32msvc/include ) is a cross-compiler... yes
checking whether we are using GNU C... yes
checking whether i386-mingw32msvc-gcc accepts -g... yes
checking how to run the C preprocessor... i386-mingw32msvc-gcc -E
checking whether i386-mingw32msvc-gcc needs -traditional... no
checking for c++... i386-mingw32msvc-g++
checking whether the C++ compiler (i386-mingw32msvc-g++
-I/opt/xmingw/i386-mingw32msvc/include ) works... no
configure: error: installation or configuration problem: C++ compiler cannot
create executables.
Comment 23 Adrian Smarzewski 2005-05-17 21:27:50 UTC
xmingw-gcc should be reemerged after all other xmingw packages. After first
emerge you don't have c++ compiler (but check it).
Comment 24 Adrian Smarzewski 2005-05-17 21:29:43 UTC
I'm sorry, now I can see, that you have g++ compiled. Look into configure.log
for some details.
Comment 25 Rob Cakebread (RETIRED) gentoo-dev 2005-05-18 09:51:49 UTC
There was no /opt/bin/xmingw/i386-mingw32msvc-g++ and re-emerging
dev-util/xmingw-gcc installed i386-mingw32msvc-g++ 
I see this is a known issue in bug #64886

Ok, the helloworld compiled and runs fine on Windows for me. I'll add this to
cvs today. The name will be dev-libs/wx-xmingw unless anyone speaks up real soon
with a better suggestion.

Thanks
Comment 26 Rob Cakebread (RETIRED) gentoo-dev 2005-05-18 16:07:52 UTC
Added to CVS.
Thanks for the ebuild Adrian and help everyone.
Comment 27 Adrian Smarzewski 2006-05-02 11:24:44 UTC
Created attachment 86004 [details]
ebuild for wxWidgets 2.6.3

This is a new ebuild for wxWidgets 2.6.3.
In addition it allows you to have several wxWidgets builds
compiled and installed at once (just like in wxGTK ebuild).
Ebuild was prepared as SILVERCODERS (http://silvercoders.com) company
contribute to Gentoo project.
Comment 28 Adrian Smarzewski 2006-05-02 11:34:35 UTC
Created attachment 86005 [details]
ebuild for wxWidgets 2.6.3

This is a new ebuild for wxWidgets 2.6.3.
In addition it allows you to have several wxWidgets builds
compiled and installed at once (just like in wxGTK ebuild).
Ebuild was prepared as SILVERCODERS (http://silvercoders.com) company
contribute to Gentoo project.
Comment 29 Adrian Smarzewski 2006-05-02 11:36:52 UTC
Sorry for a duplicate, there was some error during attachement adding process.
Comment 30 SpanKY gentoo-dev 2006-09-16 22:29:03 UTC
dev-libs/wx-xmingw needs to be punted, not updated
Comment 31 Adrian Smarzewski 2006-09-17 02:43:39 UTC
Any reason?
Comment 32 Michael Färber 2006-10-06 03:43:56 UTC
I would be very glad if somebody figured out to cross-compile wxWidgets programs on the new crossdev-MinGW, because I didn't - see http://forums.gentoo.org/viewtopic-t-501680.html


If somebody could help me with this, I could even update the ebuild ...
Comment 33 Jakub Moc (RETIRED) gentoo-dev 2006-10-31 05:10:31 UTC
# Mike Frysinger <vapier@gentoo.org> (23 Sep 2006)
# Use `emerge crossdev && crossdev mingw32`
dev-libs/wx-xmingw
dev-util/xmingw-binutils
dev-util/xmingw-gcc
dev-util/xmingw-runtime
dev-util/xmingw-w32api
dev-libs/wxactivex

Ebuild p.masked as it depends on deprecated package. Closing this bug.