Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » Mac OSX » 701-dev1 / 2007.1beta on Mac OSX
Re: 701-dev1 / 2007.1beta on Mac OSX [message #7929 is a reply to message #7850] Wed, 31 January 2007 22:45 Go to previous messageGo to next message
kcabobert is currently offline  kcabobert
Messages: 51
Registered: January 2007
Location: USA
Member
Yup, just got back to my office(was traveling) and had some time to play with it. I am able to compile new versions of the ide with the ide.

I am trying to compile some previous packages I wrote, but it seems unable to find uppsrc. Hopefully I can get that solved tonight.

I have discovered that setting 'static' will not compile correctly. But I am able to compile using 'shared'.

What flags are you setting to compile universal binaries?
Re: 701-dev1 / 2007.1beta on Mac OSX [message #7930 is a reply to message #7929] Wed, 31 January 2007 23:44 Go to previous messageGo to next message
fallingdutch is currently offline  fallingdutch
Messages: 258
Registered: July 2006
Experienced Member
on Linux stable doesn't work either.

so all packages released for Linux are compiled as shared

Bas
Re: 701-dev1 / 2007.1beta on Mac OSX [message #7932 is a reply to message #7930] Thu, 01 February 2007 04:08 Go to previous messageGo to next message
kcabobert is currently offline  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 Go to previous messageGo to next message
lundman is currently offline  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 #8919 is a reply to message #7777] Sat, 07 April 2007 19:45 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 11700
Registered: November 2005
Ultimate Member
kcabobert wrote on Sun, 21 January 2007 19:06

I re-downloaded the dmg mentioned in the post you reference. After a bit of tinkering theide opened.



Today, with OSX 10.4.8 at hands, I finally wanted to start the work on native port... Now I am stuck at "Bus error" in lundman's package.

Which makes me wonder, what was the "bit of tinkering"? Smile

BTW, I am all new to OS X. Now typing this, has it "Home" and "End" keys to move to beginning/end of line? Smile

Mirek
Re: 701-dev1 / 2007.1beta on Mac OSX [message #8926 is a reply to message #8919] Sun, 08 April 2007 11:00 Go to previous messageGo to next message
lundman is currently offline  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! Smile


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 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 11700
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 Smile

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 Wink

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 Wink

Mirek
Re: 701-dev1 / 2007.1beta on Mac OSX [message #8939 is a reply to message #8927] Mon, 09 April 2007 03:09 Go to previous messageGo to next message
lundman is currently offline  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:

index.php?t=getfile&id=514&private=0

Re: 701-dev1 / 2007.1beta on Mac OSX [message #8940 is a reply to message #8939] Mon, 09 April 2007 03:12 Go to previous messageGo to next message
lundman is currently offline  lundman
Messages: 175
Registered: March 2006
Location: Tokyo
Experienced Member
... and the Build Methods (only 1 pic per post)

index.php?t=getfile&id=515&private=0
Re: 701-dev1 / 2007.1beta on Mac OSX [message #8941 is a reply to message #8940] Mon, 09 April 2007 05:49 Go to previous messageGo to next message
lundman is currently offline  lundman
Messages: 175
Registered: March 2006
Location: Tokyo
Experienced Member

Oh and don't forget to start the X11 application first, it'll pop up an XTerm (which you can quit). There should be a little "up arrow" under the X11 icon in the Dock bar that indicates it is loaded.

But that does display "no display found" and not core dump here, so I assume that is not the issue.
Re: 701-dev1 / 2007.1beta on Mac OSX [message #8943 is a reply to message #8941] Mon, 09 April 2007 13:22 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 11700
Registered: November 2005
Ultimate Member
Everything seems to be in order, but still "Bus error". I suspect it is font problem - crash is in FontInfo, maybe missing fonts? But I have X11 up and running.....

Anyway, I am attaching crash report.

Mirek
Re: 701-dev1 / 2007.1beta on Mac OSX [message #8946 is a reply to message #8943] Mon, 09 April 2007 14:18 Go to previous messageGo to next message
lundman is currently offline  lundman
Messages: 175
Registered: March 2006
Location: Tokyo
Experienced Member
# xlsfonts|wc -l
    5484


What about yours?


10.4.8.. can you update, at least the X11 update?

[Updated on: Mon, 09 April 2007 14:23]

Report message to a moderator

Re: 701-dev1 / 2007.1beta on Mac OSX [message #8948 is a reply to message #8946] Mon, 09 April 2007 17:16 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 11700
Registered: November 2005
Ultimate Member
lundman wrote on Mon, 09 April 2007 08:18



10.4.8.. can you update, at least the X11 update?



Excellent tip. Updating X11 did the trick, TheIDE now starts!

Thanks.

Mirek
Re: 701-dev1 / 2007.1beta on Mac OSX [message #8955 is a reply to message #8948] Tue, 10 April 2007 00:14 Go to previous messageGo to next message
lundman is currently offline  lundman
Messages: 175
Registered: March 2006
Location: Tokyo
Experienced Member

Phew, that is good. We are all very eagerly awaiting the native port over here, let me know if I can help.

Re: 701-dev1 / 2007.1beta on Mac OSX [message #9138 is a reply to message #7770] Wed, 18 April 2007 19:35 Go to previous messageGo to next message
kcabobert is currently offline  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 Go to previous message
lundman is currently offline  lundman
Messages: 175
Registered: March 2006
Location: Tokyo
Experienced Member
1: I agree Smile 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

Previous Topic: MacOS X woes
Next Topic: MacOS ide make problem
Goto Forum:
  


Current Time: Sat Feb 16 12:06:58 CET 2019

Total time taken to generate the page: 0.00900 seconds