Re: Compiling XaraLx on MacosX
Hi Simon,
Make sure automake is at least version 1.9. If not get an up to date version using fink and then autoreconf and configure XaraLX again.
If after that configure is still finding wxWidgets 2.6.2 then make sure you've got wxWidgets 2.6.3-RC2 and that you have configured it using the instructions in INSTALL-MAC.txt.
When you've done those things GTK should not be involved at all in building XaraLX. If you still get error messages concerning GTK, then something is still wrong.
For more info see:
http://www.xaraxtreme.org/developers...tructions.html
Phil
Re: Compiling XaraLx on MacosX
Quote:
Originally Posted by Pekele
well i'm not lucky. I have errors during the compilation process. It can not find some wx headers files :
Code:
error: wx/wx.h: No such file or directory
I have had this problem. The makefiles are not being provided with the correct include directory.
FIRST
It would be helpful if you first do in your XaraLX build directory to clear out any partially built products, and if you get stuck do in the XaraLX top directory.
The instructions assume that you are in fact building in the top directory, and as I am fairly sure that when as one of the last steps, we come to create the double-clickable XaraLX.app this is easiest with the directory structure in this form, it would be best to do this, at least whilst getting started.
Try .
This will almost certainly fail if you have not installed wxWidgets. If it does not, then try
Code:
wc-config --version
.
Now on my system, I seem to have wc-config as /usr/bin/wx-config, which reports its version as 2.5.3 I have no idea where this came from. Nothing should be installing to /usr/bin except Apple. It was not from the disk with the Brooklyn Bridge Book for the elemental reason that I have not yet taken it out of the package. fink can install the wxgtk variant, but that is not the same thing.
If you have a wx-config, particularly if it is on your path, I would advise that you uninstall and remove the installation responsible, unless you are confident that you can work with two live installations of wxWidgets present simultaneously on your system.
NEXT
Locate the wx-config that your build of wxWidgets created, it will be in a place like /Users/pekele/wxWidgets-2.6.3/build-unicode-debug/wx-config,
run this as:
Code:
/Users/pekele/wxWidgets-2.6.3/build-unicode-debug/wx-config --version
looking for a result like:
Code:
$ build-unicode-debug/wx-config --version
2.6.3
$
You now know that the wx-config program is working, and if interested, you can examine the output of commands like
/Users/pekele/wxWidgets-2.6.3/build-unicode-debug/wx-config --libs and /Users/pekele/wxWidgets-2.6.3/build-unicode-debug/wx-config --cflags
FINALLY
This is where you need to use --with-wx-config option to ./configure. This code should work
Code:
./configure --enable-debug --with-wx-config=/Users/pekele/wxMac-2.6.3/build-unicode-debug/wx-config
The configure script will produce dozens of lines of output including these:
Code:
checking Compiler... gcc >= 3.4.0, PreCompiled headers enabled
checking wxWidgets version... 2.6.3
checking wxWidgets GTK usage... not found
checking Linker... Darwin ld
checking CDraw location... libs/darwin
If you get some output like this:
Code:
Warning: No config found to match: /Users/pekele/wxWidgets-2.6.3/build-unicode-debug/wx-config --static=no --debug=no --unicode=yes --cxxflags
in /Users/pekele/wxWidgets-2.6.3/build-unicode-debug/lib/wx/config
If you require this configuration, please install the desired
library build. If this is part of an automated configuration
test and no other errors occur, you may safely ignore it.
You may use wx-config --list to see all configs available in
the default prefix.
then you probably missed out the --enable-debug
I'm going to leave it there. It would be helpful if you could review my suggestions and post again if you find that what I have written above is wrong or is not helpful.
Ben
Re: Compiling XaraLx on MacosX
Quote:
Originally Posted by Pekele
... no errors are encountered but a lot of warnings appear.
/sw/share/aclocal/pstoedit.m4:7: warning: underquoted definition of AM_PATH_PSTOEDIT
and there are a lot of them. It seems a problem with automake.
Do you think these warnings made the xaralx compilation fail?
No. I get many of these. It is due to something else: Either the file /sw/share/aclocal/pstoedit.m4 or the package that installed it would be my guess.
Ben
Re: Compiling XaraLx on MacosX
Quote:
Originally Posted by Simon Young
snip
I get:
[loads of good looking snipped]
checking Compiler... gcc >= 3.4.0, PreCompiled headers enabled
checking wxWidgets version... 2.6.2
./configure: line 22080: syntax error near unexpected token `GTK,'
./configure: line 22080: ` PKG_CHECK_MODULES(GTK, gtk+-2.0)'
You should get:
Code:
checking wxWidgets version... 2.6.3
checking wxWidgets GTK usage... not found
The relevant lines from my system are:
Code:
$ grep -n GTK configure.in
117:GTK_CFLAGS=""
118:GTK_LIBS=""
128: # See if we are running on GTK
129: WX_GTK="no"
130: AC_MSG_CHECKING([wxWidgets GTK usage])
131: if echo $WX_CPPFLAGS | grep -q '__WXGTK__' ; then
132: WX_GTK="yes"
134: PKG_CHECK_MODULES(GTK, [gtk+-2.0])
195:AC_SUBST(GTK_CFLAGS)
196:AC_SUBST(GTK_LIBS)
and I suspect that you do not have the .m4 file with the expansion for PKG_CHECK_MODULES(GTK, ...). That you don't get a good error message may be our bug or it may be wxWidget's but we need to identify the package concerned and add it to the pre-requisites. Whilst there may be more information near the end of your config.log (and you should certainly look), it is likely that all that the automake system could determine it printed to the console.
Does changing the line in configure.in to PKG_CHECK_MODULES([GTK], [gtk+-2.0]) help?
See wxCode -> Autoconf guide for the source of that suggestion.
See Re: [Anarchdb-devel] Re: ARDB on Debian testing for the suggestion to install the pkg-config package. If it really is as simple as that, I am amazed that you got this far without it.
FYI
Code:
$ source /sw/bin/init.sh && sudo fink list pkg
Password:
Information about 2211 packages read in 8 seconds.
i dpkg 1.10.21-217 The Debian package manager
dpkg-awk 1.0.1-2 Awk script to scan dpkg database
i pkgconfig 0.15.0-2 Manager for library compile/link flags
xemacs-base-pkg 1.84-1 Basic files needed for xemacs package installation
xemacs-efs-pkg 1.32-1 Allows xemacs to fetch files from the FTP site or mirrors
xemacs-sumo-pkg 20040202-1 All xemacs packages together
I am sorry that I am asking you to do all the work, but the MacOS build system is known not to be ready for public performance, and as the one with the problem we are depending on you to roll up your sleeves and help out!
Ben
Re: Compiling XaraLx on MacosX
thank you very much BPFowler.
I did not installed wx-widget and so i forgot to export the path for include and libs. Your shell commands were right.
But i have another error. I think it will be more easier to fix it since it comes from my configuration, i guess :
In file included from .././wxOil/pngfiltr.h:104,
from prvwflt.h:110,
from bitfilt.cpp:118:
.././wxOil/outptpng.h:109:17: error: png.h: No such file or directory
.././wxOil/outptpng.h:166: error: 'png_structp' does not name a type
.././wxOil/outptpng.h:167: error: 'png_infop' does not name a type
the libpng is installed. I have the png.h file in /sw/include/libpng12/
There is also one in the SRC folder of Wx-Mac's folder.
Do you have any ideas ?
thanks
Re: Compiling XaraLx on MacosX
Quote:
Originally Posted by Pekele
Code:
In file included from .././wxOil/pngfiltr.h:104,
from prvwflt.h:110,
from bitfilt.cpp:118:
.././wxOil/outptpng.h:109:17: error: png.h: No such file or directory
.././wxOil/outptpng.h:166: error: 'png_structp' does not name a type
.././wxOil/outptpng.h:167: error: 'png_infop' does not name a type
I have libpng installed. I have the
png.h file in
/sw/include/libpng12/
There is also one in the SRC folder of Wx-Mac's folder.
You will have to wait until someone comes along who has been at this for longer than I have. I also have png.h in /sw/include/libpng12/, and IIRC I solved that problem by adding something like CFLAGS=-I/sw/include/libpng12 somewhere, but I forget exactly where.
Assuming that XaraLX (or wxWidgets, I am not sure which code gets to choose) can use any installed libpng, then there ought to be a means to say so that configure picks up /sw/include for the header file and /sw/lib for the library. On the Mac, it should even look there by default.
I have been able to work with this enough to get my XaraLX to compile link and run, but I am not really in a position to give advice on this. Thinking about it, it would be better if the wxWidgets library handled bitmaps and so forth - they are probably cross platform.
I suggest 'bodge it' for now, and wait for a more official answer or for someone else with experience to happen along - your thread has had over 250 people recorded as having read it.
Ben
Re: Compiling XaraLx on MacosX
your advices are welcome and i 'm finding them very clever.
I looked to the configure script file and this is the one of wx-widget wich have a --with-libpng option. So i'm going to compil it another time.
"I solved that problem by adding something like CFLAGS=-I/sw/include/libpng12 "
Maybe you added it in a makefile.
I should have look to the configure script earlier.
thanks again, i will try tomorrow.
Too bad i had too much work this week. I'm in a hurry to draw with XaraLx ;)
Re: Compiling XaraLx on MacosX
Here the dayly report ;)
I succeed passing the png.h error by adding in each makefile in the CFLAGS and CPPFLAGS this line : -I/sw/include/libpng12
after that i had an error for libjpeg.h. So i added in each makefile, at the same place -I/sw/include/
after that i had an error of a bad libCDraw version. So i replace the one existing by a more recent one and executed the command : ranlib /Users/Pekele/XaraLX/libs/darwin/libCDraw.a
It seems that this action has dissepeared from the tutorial on the macosx's building page.
well after that, all was going on very well until a new error comes, which i really don't know how to fix it :
g++ Kernel/*.o wxOil/*.o tools/*.o wxXtra/*.o --debug -L./libs/darwin -L/Users/Pekele/wxMac-2.6.3/build-unicode-debug/lib -framework QuickTime -framework IOKit -framework Carbon -framework Cocoa -framework System -lwx_macud-2.6 -lCDraw -o XaraLX
/usr/bin/ld: Undefined symbols:
_GColour_ReturnBrushRGB
collect2: ld returned 1 exit status
make[1]: *** [XaraLX] Error 1
make: *** [all-recursive] Error 1
too bad. Maybe it comes from the libCDraw library ?
any ideas ?
Re: Compiling XaraLx on MacosX
Quote:
Originally Posted by Pekele
Code:
g++ Kernel/*.o wxOil/*.o tools/*.o wxXtra/*.o --debug -L./libs/darwin -L/Users/Pekele/wxMac-2.6.3/build-unicode-debug/lib -framework QuickTime -framework IOKit -framework Carbon -framework Cocoa -framework System -lwx_macud-2.6 -lCDraw -o XaraLX
/usr/bin/ld: Undefined symbols:
_GColour_ReturnBrushRGB
collect2: ld returned 1 exit status
make[1]: *** [XaraLX] Error 1
make: *** [all-recursive] Error 1
When you updated the CDraw library, did you also update the code that calls it, by doing an svn up of your source tree? You could also check which files make use of that symbol using find and grep.
Ben
Re: Compiling XaraLx on MacosX
no i did not. I did not use the subversion sources. I download the tarball on the Xara's website.
So i will download svn 's version and will see.
thanks