U++ framework
Do not panic. Ask here before giving up.

Home » Developing U++ » Mac OS » 701-dev1 / 2007.1beta on Mac OSX
701-dev1 / 2007.1beta on Mac OSX [message #7770] Sun, 21 January 2007 19:03 Go to next message
kcabobert is currently offline  kcabobert
Messages: 51
Registered: January 2007
Location: USA
Member
I have been trying for a bit to get Upp up and running on OS X 10.4.8. I have noticed a few reports of people 'just compiling and running,' and I am curious if they have additional libraries installed.

My setup:
MacBook Pro: 2.16Ghz Core 2 Duo, 2Gb Ram, OS X 10.4.8
XCode / MacOSX10.4u SDK / X11 Extension (from DVD).
Self compiled
- Expat2.0.0,
- FreeType2.3.0,
- FontConfig2.4.2
all compiled cleanly and installed to /usr/lib

I have downloaded the 701-dev1 and 2007.1beta versions of UPP. I am using the Makefile located in the 'uppsrc/ide' directory in both cases. I can not get the 612-dev3 binary version of upp for Mac OSX to run... so all edits are done using vim.

The primary changes to the Makefile:
Set include paths to find fontconfig / freetype.
Adjust the link command (remove the --start-group / --end-group tags).
Added a couple libraries to the link list. (I think they were freetype/fontconfig/Xft/expat/Xrender)

I am down to one error:
/usr/bin/ld: Undefined symbols:
vtable for Upp::BMPEncoder

I have tried adding a destructor... no help.

Does anyone have any thoughts? How about the people who have it running on OSX, what did you have to do?

Robert
Re: 701-dev1 / 2007.1beta on Mac OSX [message #7771 is a reply to message #7770] Sun, 21 January 2007 20:09 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
The simple and fast way now, thanks to Lundman, is to fetch .dmg files with working TheIDE and compile the new version with it.

http://www.ultimatepp.org/forum/index.php?t=msg&th=1794& amp;prevloaded=1&&start=40

[Updated on: Sun, 21 January 2007 20:11]

Report message to a moderator

Re: 701-dev1 / 2007.1beta on Mac OSX [message #7772 is a reply to message #7771] Sun, 21 January 2007 20:10 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
...in the process, starting TheIDE will reveal missing libraries...
Re: 701-dev1 / 2007.1beta on Mac OSX [message #7777 is a reply to message #7772] Mon, 22 January 2007 01:06 Go to previous messageGo to next message
kcabobert is currently offline  kcabobert
Messages: 51
Registered: January 2007
Location: USA
Member
I re-downloaded the dmg mentioned in the post you reference. After a bit of tinkering theide opened. However, it seems no matter where I stick the upp folder it was not finding it. (I tried: my home directory, the root directory, right beside the ide.app folder, and a hand full of other misc spots).

Where should I place the upp folder?

I can not really do more on it right now as I am reinstalling OS X. However, once it is back up and running I will start working on it more.

Robert
Re: 701-dev1 / 2007.1beta on Mac OSX [message #7778 is a reply to message #7777] Mon, 22 January 2007 06:32 Go to previous messageGo to next message
kcabobert is currently offline  kcabobert
Messages: 51
Registered: January 2007
Location: USA
Member
Well, I have OS X and most of my software reinstalled. I think I figured out what trashed the system. I may have hit the "Clean output directory" by mistake. Apparently it was pointing at the root(/), or /Applications directory and wiped a number of programs out. Hopefully that won't happen again.

After some tinkering I still can not get theide to find the upp directory. I recall this issue on a Linux system once, but can not recall how I solved it. Any help or suggestions would be appreciated.

Robert

[Updated on: Mon, 22 January 2007 06:44]

Report message to a moderator

Re: 701-dev1 / 2007.1beta on Mac OSX [message #7779 is a reply to message #7778] Mon, 22 January 2007 11:16 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
Ah, sorry about that. This is really just the very first entry to MacOS X world, there is no automatic install yet.

You have to setup your assemblies manually - right click in the "Assembly" pane of initial dialog, then setup assemblies.

For recompiling TheIDE, you need to setup "uppsrc" only.

Mirek
Re: 701-dev1 / 2007.1beta on Mac OSX [message #7780 is a reply to message #7779] Mon, 22 January 2007 14:43 Go to previous messageGo to next message
kcabobert is currently offline  kcabobert
Messages: 51
Registered: January 2007
Location: USA
Member
Got theide loaded, and running. Loaded uppsrc and exported the ide's Makefile. Now I am stopped at a libcrt0 link error. Making progress, slowly but surely.

I have to head to my office now, but will try more when I get there.

Robert

[Updated on: Mon, 22 January 2007 14:44]

Report message to a moderator

Re: 701-dev1 / 2007.1beta on Mac OSX [message #7781 is a reply to message #7780] Mon, 22 January 2007 14:47 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
kcabobert wrote on Mon, 22 January 2007 08:43

Got theide loaded, and running. Loaded uppsrc and exported the ide's Makefile.



Why?! If you have TheIDE, setup build method and compile. Makefiles are useful only if you do not have any other choice.

Mirek
Re: 701-dev1 / 2007.1beta on Mac OSX [message #7783 is a reply to message #7781] Mon, 22 January 2007 16:07 Go to previous messageGo to next message
kcabobert is currently offline  kcabobert
Messages: 51
Registered: January 2007
Location: USA
Member
Well, in hind-sight I should have. When I was trying to compile I was getting errors related to fontconfig / freetype. So I recompiled those and now I can not get theide to run due to more fontconfig errors.

Fontconfig warning: line 32: unknown element "cachedir"
Fontconfig warning: line 33: unknown element "cachedir"
Fontconfig error: "conf.d", line 1: no element found

These are unrelated to theide, something (possibly permissions) are wrong. Hopefully I can get this fixed soon though, I would like to recompile my app for Mac soon.

As an aside, we are running the application on Windows and Linux in our field offices. Once we get the Mac OS version running we can get it installed at our HQ. Excellent work!!

Robert
Re: 701-dev1 / 2007.1beta on Mac OSX [message #7784 is a reply to message #7783] Mon, 22 January 2007 17:17 Go to previous messageGo to next message
kcabobert is currently offline  kcabobert
Messages: 51
Registered: January 2007
Location: USA
Member
Got the ide to compile and link cleanly. When I try to run it I get "Bus Error." Any ideas?

Robert

[Updated on: Mon, 22 January 2007 17:30]

Report message to a moderator

Re: 701-dev1 / 2007.1beta on Mac OSX [message #7785 is a reply to message #7784] Mon, 22 January 2007 17:42 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
Possible configuration problem.

Maybe activate Setup/Verbose mode copy&paste the console output of building the first package.

Mirek
Re: 701-dev1 / 2007.1beta on Mac OSX [message #7786 is a reply to message #7785] Mon, 22 January 2007 17:42 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
Now thinking about it, copy most likely will not work now Smile

If it does not, screenshot.

Mirek
Re: 701-dev1 / 2007.1beta on Mac OSX [message #7791 is a reply to message #7786] Tue, 23 January 2007 00:52 Go to previous messageGo to next message
kcabobert is currently offline  kcabobert
Messages: 51
Registered: January 2007
Location: USA
Member
The problem is that the "ide" compiles fine inside the ide. Then when I try to run the newly created "ide" all I get is "Bus Error."
$ ./ide 
Bus error


Here is the full output when I recompile (in verbose mode) the ide:

Quote:

----- ide\Common ( GUI GCC32 DEBUG SHARED DEBUG_FULL BLITZ OSX11 ) (1 / 26)
cd /Users/bobert/upp/uppsrc/ide/Common
BLITZ: Common.cpp Hdepend.cpp Package.cpp Workspace.cpp usc.cpp ComDlg.cpp
c++ -c -I"/Users/bobert/upp/uppsrc" -I"/Users/bobert/Downloads/upp-src-2007/uppsrc" -I"/usr/include/freetype2" -DflagGUI -DflagGCC32 -DflagDEBUG -DflagSHARED -DflagDEBUG_FULL -DflagBLITZ -DflagOSX11 -DbmYEAR=2007 -DbmMONTH=1 -DbmDAY=22 -DbmHOUR=17 -DbmMINUTE=50 -DbmSECOND=16 -m32 -ggdb -g2 -fexceptions -D_DEBUG -O0 " /Users/bobert/upp07b1/out/ide/Common/GCC.Debug_full.Gui.Shar ed/$blitz.cpp " -o " /Users/bobert/upp07b1/out/ide/Common/GCC.Debug_full.Gui.Shar ed/$blitz.o "
ide\Common: 6 file(s) built in (0:03.01), 501 msecs / file, duration = 3024 msecs
Re: 701-dev1 / 2007.1beta on Mac OSX [message #7792 is a reply to message #7791] Tue, 23 January 2007 00:57 Go to previous messageGo to next message
kcabobert is currently offline  kcabobert
Messages: 51
Registered: January 2007
Location: USA
Member
Here is the dump w/o BLITZ:

----- ide\Common ( GUI GCC32 DEBUG SHARED DEBUG_FULL OSX11 ) (1 / 26)
cd /Users/bobert/upp/uppsrc/ide/Common
Common.cpp
c++ -c  -I"/Users/bobert/upp/uppsrc" -I"/Users/bobert/Downloads/upp-src-2007/uppsrc" -I"/usr/include/freetype2" -DflagGUI -DflagGCC32 -DflagDEBUG -DflagSHA
	RED -DflagDEBUG_FULL -DflagOSX11 -DbmYEAR=2007 -DbmMONTH=1 -DbmDAY=22 -DbmHOUR=17 -DbmMINUTE=53 -DbmSECOND=37 -m32 -ggdb -g2  -fexceptions  -D_DEBUG -O
	0 -x c++ "/Users/bobert/upp/uppsrc/ide/Common/Common.cpp" -o "/Users/bobert/upp07b1/out/ide/Common/GCC.Debug_full.Gui.Noblitz.Shared/Common.o"
c++ -c  -I"/Users/bobert/upp/uppsrc" -I"/Users/bobert/Downloads/upp-src-2007/uppsrc" -I"/usr/include/freetype2" -DflagGUI -DflagGCC32 -DflagDEBUG -DflagSHA
	RED -DflagDEBUG_FULL -DflagOSX11 -DbmYEAR=2007 -DbmMONTH=1 -DbmDAY=22 -DbmHOUR=17 -DbmMINUTE=53 -DbmSECOND=37 -m32 -ggdb -g2  -fexceptions  -D_DEBUG -O
	0 -x c++ "/Users/bobert/upp/uppsrc/ide/Common/Common.cpp" -o "/Users/bobert/upp07b1/out/ide/Common/GCC.Debug_full.Gui.Noblitz.Shared/Common.o"
compiled in (0:02.08)
Hdepend.cpp
c++ -c  -I"/Users/bobert/upp/uppsrc" -I"/Users/bobert/Downloads/upp-src-2007/uppsrc" -I"/usr/include/freetype2" -DflagGUI -DflagGCC32 -DflagDEBUG -DflagSHA
	RED -DflagDEBUG_FULL -DflagOSX11 -DbmYEAR=2007 -DbmMONTH=1 -DbmDAY=22 -DbmHOUR=17 -DbmMINUTE=53 -DbmSECOND=37 -m32 -ggdb -g2  -fexceptions  -D_DEBUG -O
	0 -x c++ "/Users/bobert/upp/uppsrc/ide/Common/Hdepend.cpp" -o "/Users/bobert/upp07b1/out/ide/Common/GCC.Debug_full.Gui.Noblitz.Shared/Hdepend.o"
c++ -c  -I"/Users/bobert/upp/uppsrc" -I"/Users/bobert/Downloads/upp-src-2007/uppsrc" -I"/usr/include/freetype2" -DflagGUI -DflagGCC32 -DflagDEBUG -DflagSHA
	RED -DflagDEBUG_FULL -DflagOSX11 -DbmYEAR=2007 -DbmMONTH=1 -DbmDAY=22 -DbmHOUR=17 -DbmMINUTE=53 -DbmSECOND=37 -m32 -ggdb -g2  -fexceptions  -D_DEBUG -O
	0 -x c++ "/Users/bobert/upp/uppsrc/ide/Common/Hdepend.cpp" -o "/Users/bobert/upp07b1/out/ide/Common/GCC.Debug_full.Gui.Noblitz.Shared/Hdepend.o"
compiled in (0:02.00)
Package.cpp
c++ -c  -I"/Users/bobert/upp/uppsrc" -I"/Users/bobert/Downloads/upp-src-2007/uppsrc" -I"/usr/include/freetype2" -DflagGUI -DflagGCC32 -DflagDEBUG -DflagSHA
	RED -DflagDEBUG_FULL -DflagOSX11 -DbmYEAR=2007 -DbmMONTH=1 -DbmDAY=22 -DbmHOUR=17 -DbmMINUTE=53 -DbmSECOND=37 -m32 -ggdb -g2  -fexceptions  -D_DEBUG -O
	0 -x c++ "/Users/bobert/upp/uppsrc/ide/Common/Package.cpp" -o "/Users/bobert/upp07b1/out/ide/Common/GCC.Debug_full.Gui.Noblitz.Shared/Package.o"
c++ -c  -I"/Users/bobert/upp/uppsrc" -I"/Users/bobert/Downloads/upp-src-2007/uppsrc" -I"/usr/include/freetype2" -DflagGUI -DflagGCC32 -DflagDEBUG -DflagSHA
	RED -DflagDEBUG_FULL -DflagOSX11 -DbmYEAR=2007 -DbmMONTH=1 -DbmDAY=22 -DbmHOUR=17 -DbmMINUTE=53 -DbmSECOND=37 -m32 -ggdb -g2  -fexceptions  -D_DEBUG -O
	0 -x c++ "/Users/bobert/upp/uppsrc/ide/Common/Package.cpp" -o "/Users/bobert/upp07b1/out/ide/Common/GCC.Debug_full.Gui.Noblitz.Shared/Package.o"
compiled in (0:02.00)
Workspace.cpp
c++ -c  -I"/Users/bobert/upp/uppsrc" -I"/Users/bobert/Downloads/upp-src-2007/uppsrc" -I"/usr/include/freetype2" -DflagGUI -DflagGCC32 -DflagDEBUG -DflagSHA
	RED -DflagDEBUG_FULL -DflagOSX11 -DbmYEAR=2007 -DbmMONTH=1 -DbmDAY=22 -DbmHOUR=17 -DbmMINUTE=53 -DbmSECOND=37 -m32 -ggdb -g2  -fexceptions  -D_DEBUG -O
	0 -x c++ "/Users/bobert/upp/uppsrc/ide/Common/Workspace.cpp" -o "/Users/bobert/upp07b1/out/ide/Common/GCC.Debug_full.Gui.Noblitz.Shared/Workspace.o"
c++ -c  -I"/Users/bobert/upp/uppsrc" -I"/Users/bobert/Downloads/upp-src-2007/uppsrc" -I"/usr/include/freetype2" -DflagGUI -DflagGCC32 -DflagDEBUG -DflagSHA
	RED -DflagDEBUG_FULL -DflagOSX11 -DbmYEAR=2007 -DbmMONTH=1 -DbmDAY=22 -DbmHOUR=17 -DbmMINUTE=53 -DbmSECOND=37 -m32 -ggdb -g2  -fexceptions  -D_DEBUG -O
	0 -x c++ "/Users/bobert/upp/uppsrc/ide/Common/Workspace.cpp" -o "/Users/bobert/upp07b1/out/ide/Common/GCC.Debug_full.Gui.Noblitz.Shared/Workspace.o"
compiled in (0:02.01)
usc.cpp
c++ -c  -I"/Users/bobert/upp/uppsrc" -I"/Users/bobert/Downloads/upp-src-2007/uppsrc" -I"/usr/include/freetype2" -DflagGUI -DflagGCC32 -DflagDEBUG -DflagSHA
	RED -DflagDEBUG_FULL -DflagOSX11 -DbmYEAR=2007 -DbmMONTH=1 -DbmDAY=22 -DbmHOUR=17 -DbmMINUTE=53 -DbmSECOND=37 -m32 -ggdb -g2  -fexceptions  -D_DEBUG -O
	0 -x c++ "/Users/bobert/upp/uppsrc/ide/Common/usc.cpp" -o "/Users/bobert/upp07b1/out/ide/Common/GCC.Debug_full.Gui.Noblitz.Shared/usc.o"
c++ -c  -I"/Users/bobert/upp/uppsrc" -I"/Users/bobert/Downloads/upp-src-2007/uppsrc" -I"/usr/include/freetype2" -DflagGUI -DflagGCC32 -DflagDEBUG -DflagSHA
	RED -DflagDEBUG_FULL -DflagOSX11 -DbmYEAR=2007 -DbmMONTH=1 -DbmDAY=22 -DbmHOUR=17 -DbmMINUTE=53 -DbmSECOND=37 -m32 -ggdb -g2  -fexceptions  -D_DEBUG -O
	0 -x c++ "/Users/bobert/upp/uppsrc/ide/Common/usc.cpp" -o "/Users/bobert/upp07b1/out/ide/Common/GCC.Debug_full.Gui.Noblitz.Shared/usc.o"
compiled in (0:01.84)
ComDlg.cpp
c++ -c  -I"/Users/bobert/upp/uppsrc" -I"/Users/bobert/Downloads/upp-src-2007/uppsrc" -I"/usr/include/freetype2" -DflagGUI -DflagGCC32 -DflagDEBUG -DflagSHA
	RED -DflagDEBUG_FULL -DflagOSX11 -DbmYEAR=2007 -DbmMONTH=1 -DbmDAY=22 -DbmHOUR=17 -DbmMINUTE=53 -DbmSECOND=37 -m32 -ggdb -g2  -fexceptions  -D_DEBUG -O
	0 -x c++ "/Users/bobert/upp/uppsrc/ide/Common/ComDlg.cpp" -o "/Users/bobert/upp07b1/out/ide/Common/GCC.Debug_full.Gui.Noblitz.Shared/ComDlg.o"
c++ -c  -I"/Users/bobert/upp/uppsrc" -I"/Users/bobert/Downloads/upp-src-2007/uppsrc" -I"/usr/include/freetype2" -DflagGUI -DflagGCC32 -DflagDEBUG -DflagSHA
	RED -DflagDEBUG_FULL -DflagOSX11 -DbmYEAR=2007 -DbmMONTH=1 -DbmDAY=22 -DbmHOUR=17 -DbmMINUTE=53 -DbmSECOND=37 -m32 -ggdb -g2  -fexceptions  -D_DEBUG -O
	0 -x c++ "/Users/bobert/upp/uppsrc/ide/Common/ComDlg.cpp" -o "/Users/bobert/upp07b1/out/ide/Common/GCC.Debug_full.Gui.Noblitz.Shared/ComDlg.o"
compiled in (0:01.78)
Creating library...
ide\Common: 6 file(s) built in (0:11.66), 1944 msecs / file, duration = 11788 msecs
ar -sr "/Users/bobert/upp07b1/out/ide/Common/GCC.Debug_full.Gui.Noblitz.Shared/Common.a" "/Users/bobert/upp07b1/out/ide/Common/GCC.Debug_full.Gui.Noblitz.S
	hared/Common.o" "/Users/bobert/upp07b1/out/ide/Common/GCC.Debug_full.Gui.Noblitz.Shared/Hdepend.o" "/Users/bobert/upp07b1/out/ide/Common/GCC.Debug_full
	.Gui.Noblitz.Shared/Package.o" "/Users/bobert/upp07b1/out/ide/Common/GCC.Debug_full.Gui.Noblitz.Shared/Workspace.o" "/Users/bobert/upp07b1/out/ide/Comm
	on/GCC.Debug_full.Gui.Noblitz.Shared/usc.o" "/Users/bobert/upp07b1/out/ide/Common/GCC.Debug_full.Gui.Noblitz.Shared/ComDlg.o"
ar: creating archive /Users/bobert/upp07b1/out/ide/Common/GCC.Debug_full.Gui.Noblitz.Shared/Common.a
ar -sr "/Users/bobert/upp07b1/out/ide/Common/GCC.Debug_full.Gui.Noblitz.Shared/Common.a" "/Users/bobert/upp07b1/out/ide/Common/GCC.Debug_full.Gui.Noblitz.S
	hared/Common.o" "/Users/bobert/upp07b1/out/ide/Common/GCC.Debug_full.Gui.Noblitz.Shared/Hdepend.o" "/Users/bobert/upp07b1/out/ide/Common/GCC.Debug_full
	.Gui.Noblitz.Shared/Package.o" "/Users/bobert/upp07b1/out/ide/Common/GCC.Debug_full.Gui.Noblitz.Shared/Workspace.o" "/Users/bobert/upp07b1/out/ide/Comm
	on/GCC.Debug_full.Gui.Noblitz.Shared/usc.o" "/Users/bobert/upp07b1/out/ide/Common/GCC.Debug_full.Gui.Noblitz.Shared/ComDlg.o"
Exitcode: 0
/Users/bobert/upp07b1/out/ide/Common/GCC.Debug_full.Gui.Noblitz.Shared/Common.a (2070932 B) created in (0:00.27)
Re: 701-dev1 / 2007.1beta on Mac OSX [message #7793 is a reply to message #7792] Tue, 23 January 2007 01:15 Go to previous messageGo to next message
kcabobert is currently offline  kcabobert
Messages: 51
Registered: January 2007
Location: USA
Member
OK, I tried running theide in gdb.

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000010
0x00be79d3 in XftCharExists ()


So maybe the Xft library is causing my issue?
Re: 701-dev1 / 2007.1beta on Mac OSX [message #7794 is a reply to message #7793] Tue, 23 January 2007 02:26 Go to previous messageGo to next message
kcabobert is currently offline  kcabobert
Messages: 51
Registered: January 2007
Location: USA
Member
It seems that in some forum I saw that this error may be related to the version of GCC used. Currently I am using gcc-4.0.1, should I be using 3.3?
Re: 701-dev1 / 2007.1beta on Mac OSX [message #7796 is a reply to message #7793] Tue, 23 January 2007 08:40 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
kcabobert wrote on Mon, 22 January 2007 19:15

OK, I tried running theide in gdb.

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000010
0x00be79d3 in XftCharExists ()


So maybe the Xft library is causing my issue?


Well, likely, but it is very strange that binary TheIDE works... (uses Xft too).

AFAIK there was no change in Xft related code.

Mirek
Re: 701-dev1 / 2007.1beta on Mac OSX [message #7797 is a reply to message #7794] Tue, 23 January 2007 08:41 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
kcabobert wrote on Mon, 22 January 2007 20:26

It seems that in some forum I saw that this error may be related to the version of GCC used. Currently I am using gcc-4.0.1, should I be using 3.3?


Could be. But we are using 4.x.x versions in Ubuntu without problems...

But I guess it is worth trying. Also you might want to compile the exact same sources in linux to test whether it is some deviation in Xft...

Mirek
Re: 701-dev1 / 2007.1beta on Mac OSX [message #7813 is a reply to message #7797] Wed, 24 January 2007 05:42 Go to previous messageGo to next message
kcabobert is currently offline  kcabobert
Messages: 51
Registered: January 2007
Location: USA
Member
I tried to compile the ide version I have running on the Mac, 612.r43. I get the same "Bus Error." It will be a few days before I get back to my linux machine to try compiling.

I can not get a clean compile with GCC 3.3.

Has anyone else tried compiling under OSX 10.4.8?

I am wondering if my issues are resulting from the fact that I compiled versions of expat / freetype and fontconfig. Does anyone have thoughts on that?

Robert
Re: 701-dev1 / 2007.1beta on Mac OSX [message #7850 is a reply to message #7813] Fri, 26 January 2007 04:23 Go to previous messageGo to next message
lundman is currently offline  lundman
Messages: 175
Registered: March 2006
Location: Tokyo
Experienced Member
Hey! Sorry, I should have been paying attention to this thread Smile I can probably help with the OsX version. The Xft crash is because Xft could not find any fonts. Make sure you have X11 installed on your OS, which should include the Xft/fontconfig fonts.

I'm on a fresh OsX (intel) now, and after installing "Optional Packages, X11" of the install CD, plus MacPorts of things like "libpng", it works again.

As mentioned, you have to create the Assembly, and point it to your uppsrc/ directory, as well as any other directories you want.

In my build environment I set:


INCLUDE Directories:
/Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include/
/Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include/freetype2/
/usr/X11R6/include
/opt/local/include


LIBRARY Directories:
/usr/X11R6/lib
/opt/local/lib


I also set different compile flags to do Universal, but that is not needed to compile natively. Let me know if you want to know more.

Compile as "Shared Libs". Static is not work.


I have found you can bundle the shared libs in the application bundle, but figured that would be something to do once the carbon version is done. Or solve why static compiles don't work.



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: 14290
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: 14290
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: 14290
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: 14290
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 Apr 25 12:54:12 GMT+2 2026

Total time taken to generate the page: 0.00986 seconds