|
|
Home » Developing U++ » Mac OS » 701-dev1 / 2007.1beta on Mac OSX
|
|
Re: 701-dev1 / 2007.1beta on Mac OSX [message #7932 is a reply to message #7930] |
Thu, 01 February 2007 04:08 |
kcabobert
Messages: 51 Registered: January 2007 Location: USA
|
Member |
|
|
I was able to get one of my applications to compile and mostly run. When I try to close a window the application dies with "Bus Error".
I do use a special wrapper around the 'TopWindow' class to store user preferences (window size and placement). I point the WhenClose callback to my save preferences function... could that cause the problem?
[Updated on: Thu, 01 February 2007 04:14] Report message to a moderator
|
|
|
Re: 701-dev1 / 2007.1beta on Mac OSX [message #7978 is a reply to message #7932] |
Fri, 02 February 2007 04:11 |
lundman
Messages: 175 Registered: March 2006 Location: Tokyo
|
Experienced Member |
|
|
There used to be a Core on exit bug, but we did fix it. Where does gdb say it died? If you run the program as
# ./myapp -args
use
# gdb ./myapp
gdb> run -args
and use "bt" to get the backtrace once it cores.
Universal build:
In Build Environment I add Compiler flags "-arch i386 -arch ppc" to the method I want, or all of them. (debug, size, speed). If you on a ppc mac you also need to add
"-isysroot /Developer/SDKs/MacOSX10.4u.sdk"
You need the same options when linking, but alas, there is no way to set Link options with U++ based on the platform, or triggered based on your current Building method.
I get around that by using Package Organiser / Add Link Options / WHEN "OSX11" with flags:
"-arch i386 -arch ppc"
again, on PPC, you additionally need to make it:
"-syslibroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386"
Finally, "ar" on OsX is the Gnu "ar" (as in, untouched) and can not handle fat files. You can change the ide sources to use "libtool" instead of ar, by editing CppBuilder.cpp and GccBuilder.cpp.
Or, replace "ar" with a script (temporarily) if you want (or, place it elsewhere, and fiddle with your PATH, there isn't just one way to fix things in Unix).
My "ar" script looks like:
#!/bin/bash
# It is valid to say "ar rc libfoo files.o"
shift
# Skip all arguments
done=0
while [ $done == 0 ]
do
case "$1"
in
-*) shift
;;
*) done=1
;;
esac
done
# Get output name
out=$1
shift
echo libtool $* -o $out
exec /usr/bin/libtool $* -o $out
Alas, you need all support libraries to also be Universal, ide that means libpng at least. You can compile it yourself using the nice ./configure line, or, fight with "port" to do it for you. If you are doing Universal of your own App, you'll have to work out your own dependencies.
Configure line that works on many things:
env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" LDFLAGS="-arch i386 -arch ppc" ./configure --disable-dependency-tracking
|
|
|
|
Re: 701-dev1 / 2007.1beta on Mac OSX [message #8926 is a reply to message #8919] |
Sun, 08 April 2007 11:00 |
lundman
Messages: 175 Registered: March 2006 Location: Tokyo
|
Experienced Member |
|
|
That core dump was due to Xft and missing fonts I thought. It does not read (because it is not there?) the /etc/fonts.conf. Don't do not forget to install the X11 Application from CD1 on OsX, it is optional. I believe it also has a patch, so run Software Updater.
I was using ppc 10.4.8 and now Intel 10.4.8 and 10.4.9. Version made no difference when compiling, but only shared compile worked.
I can show the settings I use if it helps.
I can do a new .dmg too, I've been waiting for final version, but if you prefer rc5, I have the exe just sitting here.
The Mac default keys for Home/End is cmd-cursor down/up, you have no idea how annoying that is to get used to, but soon will!
ps. I noticed the double font problem went away when I stick it in a bundle, so I guess OsX cleans up Environment Variables for me. So not considering it an issue at all now.
[Updated on: Sun, 08 April 2007 11:01] Report message to a moderator
|
|
|
Re: 701-dev1 / 2007.1beta on Mac OSX [message #8927 is a reply to message #8926] |
Sun, 08 April 2007 11:45 |
|
mirek
Messages: 14105 Registered: November 2005
|
Ultimate Member |
|
|
lundman wrote on Sun, 08 April 2007 05:00 | That core dump was due to Xft and missing fonts I thought.
|
Yes, that is what I thought, but I am not quite able to fix the problem
Quote: |
It does not read (because it is not there?) the /etc/fonts.conf. Don't do not forget to install the X11 Application from CD1 on OsX, it is optional. I believe it also has a patch, so run Software Updater.
|
X11 installed... I have also installed some ports, including xft (most likely not quite necessarry), but still stuck at that Bus error.
However, /etc/fonts.conf does not sound familiar; I have /etc/fonts/fonts.conf? (Have to check...)
Quote: |
I can show the settings I use if it helps.
|
Would be nice. At the moment, I quite confused with all that Mac thing
Quote: |
I can do a new .dmg too, I've been waiting for final version, but if you prefer rc5, I have the exe just sitting here.
|
That is OK, once I have TheIDE capable of compiling, future is bright
Mirek
|
|
|
Re: 701-dev1 / 2007.1beta on Mac OSX [message #8939 is a reply to message #8927] |
Mon, 09 April 2007 03:09 |
lundman
Messages: 175 Registered: March 2006 Location: Tokyo
|
Experienced Member |
|
|
Using MacPorts, I installed:
"port install zlib"
"post install libpng"
I did not need to install anything Xft and the like. This is on three machines now (from scratch too, OsX install CD on).
But in case it matters:
[Users/lundman] > installed
The following ports are currently installed:
autoconf @2.60_0 (active)
bash @3.2.9_0 (active)
centericq @4.21.0_1 (active)
expat @2.0.0_1 (active)
gettext @0.16.1_0 (active)
glib2 @2.12.7_0 (active)
ispell @3.3.02_0 (active)
kermit @8.0.209_0 (active)
libiconv @1.11_0+darwin_8 (active)
libpcap @0.9.4_0 (active)
libpng @1.2.15_0+darwin_8+darwin_8_i386 (active)
libusb @0.1.12_0 (active)
lrzsz @0.12.20_0 (active)
minicom @2.1_1+darwin_8 (active)
mtr @0.72_0 (active)
nmap @4.20_0 (active)
openssl @0.9.8d_0+darwin_8 (active)
pcre @7.0_0 (active)
perl5.8 @5.8.8_0+darwin_8 (active)
pkgconfig @0.21_0 (active)
zlib @1.2.3_0+darwin_8_i386 (active)
lundman@shinken(/Users/lundman/Desktop/upp-2007.1rc5/out/ide/GCC32_UNI_i386.Gui.Main.Shared) otool -L ide
ide:
/usr/X11R6/lib/libX11.6.dylib (compatibility version 6.2.0, current version 6.2.0)
/usr/X11R6/lib/libXft.2.dylib (compatibility version 2.1.0, current version 2.1.0)
/usr/X11R6/lib/libfontconfig.1.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/X11R6/lib/libXrender.1.dylib (compatibility version 1.2.0, current version 1.2.0)
/usr/X11R6/lib/libfreetype.6.dylib (compatibility version 6.3.0, current version 6.3.0)
/usr/X11R6/lib/libexpat.0.dylib (compatibility version 0.4.0, current version 0.4.0)
/opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)
/opt/local/lib/libpng.3.dylib (compatibility version 19.0.0, current version 19.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.3.6)
lundman@shinken(/Users/lundman/Desktop/upp-2007.1rc5/out/ide/GCC32_UNI_i386.Gui.Main.Shared) echo $DISPLAY
:0.0
lundman@shinken(/Users/lundman/Desktop/upp-2007.1rc5/out/ide/GCC32_UNI_i386.Gui.Main.Shared) ktrace -di ./ide
lundman@shinken(/Users/lundman/Desktop/upp-2007.1rc5/out/ide/GCC32_UNI_i386.Gui.Main.Shared) kdump | less
[snippage]
665 ide NAMI "/etc/fonts/fonts.conf"
665 ide RET access 0
665 ide CALL open(0xe02070,0,0x1b6)
665 ide NAMI "/etc/fonts/fonts.conf"
665 ide RET open 4
665 ide CALL fstat(0x4,0xbffff2b0)
665 ide RET fstat 0
665 ide CALL read(0x4,0x200ac00,0x1000)
665 ide GIO fd 4 read 4096 bytes
"<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts.conf file to configure system font access -->
<fontconfig>
[snip]
665 ide NAMI "/Users/lundman/.fonts.conf"
665 ide RET access -1 errno 2 No such file or directory
665 ide CALL access(0xe03200,0x4)
665 ide NAMI "/etc/fonts/local.conf"
665 ide RET access -1 errno 2 No such file or directory
[snip]
665 ide CALL open(0xe02030,0,0x1b6)
665 ide NAMI "/Users/lundman/.fonts.cache-1"
665 ide RET open 4
Whole lot of font reading here..
[snip]
Also tried clearing my env, including locale, and DISPLAY. Still runs just fine.
For those with a working IDE:
|
|
|
|
|
|
|
|
|
Re: 701-dev1 / 2007.1beta on Mac OSX [message #9138 is a reply to message #7770] |
Wed, 18 April 2007 19:35 |
kcabobert
Messages: 51 Registered: January 2007 Location: USA
|
Member |
|
|
Sorry guys, I should have been checking the forumns a little more. Did you get the problem solved?
A couple things:
1) The home/end key is extremely annoying... but you can, at least, fix a few applications like Terminal to behave as expected.
2) I did not ever install anything from Mac ports. As I recall, the only thing I had to install was libpng. I just downloaded it from the the libpng site and it compiled cleanly. I, of course, installed X11 first from the DVD.
3) I have used theide and my software on PPC: 10.3.x and 10.4.{8,9}, and Intel: 10.4.{8,9} without major issues.
4) I can not get a Universal app compiled with theide... but I can manually from a terminal.
5) I have to edit Core/Core.h to include flagNOGTK in the OSX11->GUI area. Could we default that to include it, since I doubt many OSX users have GTK?
|
|
|
Re: 701-dev1 / 2007.1beta on Mac OSX [message #9153 is a reply to message #9138] |
Thu, 19 April 2007 05:55 |
lundman
Messages: 175 Registered: March 2006 Location: Tokyo
|
Experienced Member |
|
|
1: I agree Same in Mozilla/Seamonkey - typing an email is extremely annoying.
2: It needs libpng, how you install it is up to you. "ports" is just extreme convenient. In future, the extra libraries should be in the ide Bundle and fixed to look there. I saw a guide on it somewhere, but I have not done so yet.
3: Good.
4: I wrote a guide on how to do Universal. You need more compiler arguments, link arguments and finally, hack your "ar" to be better. Don't forget that any library you link against should be UB (libpng).
5: You can add -DflagNOGTK to Build Environment instead. Then it is still optional.
Acutally no, 4 linking only needs UB libraries if you are doing static linking, which I do with OpenSSL in my own project.
[Updated on: Thu, 19 April 2007 05:58] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Fri Nov 01 01:17:32 CET 2024
Total time taken to generate the page: 0.03591 seconds
|
|
|