|
|
Home » Developing U++ » Mac OS » MacOS ide make problem
MacOS ide make problem [message #28519] |
Sun, 05 September 2010 21:14  |
rett
Messages: 15 Registered: January 2010
|
Promising Member |
|
|
Hello All,
I try compile ide with lpbuild.
When compile I have error:
...
Compiling Core/Cpu.cpp (flags DARWIN GCC GUI POSIX SHARED) ...
uppsrc/Core/Cpu.cpp: In function 'void Upp::sCheckCPU()':
uppsrc/Core/Cpu.cpp:40: error: PIC register '%ebx' clobbered in 'asm'
make[1]: *** [_out/Core/DARWIN_GCC_GUI_POSIX_SHARED/Cpu.o] Error 1
make: [ide] Error 2 (ignored)
Everything done.
and
...
Compiling Core/Mt.cpp (flags DARWIN GCC GUI MT POSIX SHARED) ...
uppsrc/Core/Mt.cpp:75: error: thread-local storage not supported for this target
make[1]: *** [_out/Core/DARWIN_GCC_GUI_MT_POSIX_SHARED/Mt.o] Error 1
make: [ide] Error 2 (ignored)
Everything done.
how fix it?
b4b9ef0096f53f85f38f8c84bc5eabec
|
|
|
Re: MacOS ide make problem [message #28523 is a reply to message #28519] |
Sun, 05 September 2010 23:06   |
|
Hi Rett!
First of all: The Mac port is (AFAIK) not finished yet. So be prepared for some trouble 
What compiler are you using? The errors seem like from GCC, but the lack of thread local storage (second error) is a bit weird.
As for the first error, I am not really expert in this field, but it has something to do with position independent code generation. I think adding an option -fno-PIC might help (make CXXFLAGS="-fno-PIC" PKG=...). If not, search for PIC in gcc man page 
Best regards,
Honza
PS: How do you like the Makefile? Any feedback will be appreciated.
|
|
|
Re: MacOS ide make problem [message #28525 is a reply to message #28523] |
Mon, 06 September 2010 06:22   |
rett
Messages: 15 Registered: January 2010
|
Promising Member |
|
|
dolik.rce wrote on Sun, 05 September 2010 23:06 |
Hi Rett!
First of all: The Mac port is (AFAIK) not finished yet. So be prepared for some trouble 
|
Ok, may be I can help with testing or some fix 
dolik.rce wrote on Sun, 05 September 2010 23:06 |
What compiler are you using? The errors seem like from GCC, but the lack of thread local storage (second error) is a bit weird.
|
I use GCC. Yes, is a bit weird. On this time I compile without MT.
dolik.rce wrote on Sun, 05 September 2010 23:06 |
As for the first error, I am not really expert in this field, but it has something to do with position independent code generation. I think adding an option -fno-PIC might help (make CXXFLAGS="-fno-PIC" PKG=...). If not, search for PIC in gcc man page 
|
Thank you, It works.
dolik.rce wrote on Sun, 05 September 2010 23:06 |
PS: How do you like the Makefile? Any feedback will be appreciated.
|
Thank a lot for Makefile, It's very good for me.
b4b9ef0096f53f85f38f8c84bc5eabec
[Updated on: Mon, 06 September 2010 07:07] Report message to a moderator
|
|
|
Re: MacOS ide make problem [message #28535 is a reply to message #28525] |
Mon, 06 September 2010 11:16   |
|
rett wrote on Mon, 06 September 2010 06:22 |
dolik.rce wrote on Sun, 05 September 2010 23:06 |
What compiler are you using? The errors seem like from GCC, but the lack of thread local storage (second error) is a bit weird.
|
I use GCC. Yes, is a bit weird. On this time I compile without MT.
|
I did some reading and found out that it is not that weird after all. Mac OS X gcc has no support for TLS. You might have to wait till it supports c++0x standard, which standardizes it 
BTW: I see you were compiling in GUI mode, how does that work on Mac? I was under impression that that is the problematic part of porting...
Honza
|
|
|
|
Re: MacOS ide make problem [message #28553 is a reply to message #28552] |
Mon, 06 September 2010 20:27   |
|
Hi Rett,
By compiling "in GUI mode" I meant "with GUI flag", sorry for being imprecise 
The linking problem should be solvable easily just by overwriting the default value of LDFLAGS. Leaving it empty should work just fine for starter. So now the command line should be:make -f uppbox/lpbuild/Makefile CXXFLAGS="-fno-PIC" PKG=ide "FLAGS=GUI GCC SHARED NOGTK" DIRS=uppsrc LDFLAGS=
If that works, you can also try LDFLAGS="-Wl,-s" 
Honza
|
|
|
|
Re: MacOS ide make problem [message #28561 is a reply to message #28559] |
Tue, 07 September 2010 10:24   |
|
rett wrote on Tue, 07 September 2010 06:51 |
Yes, I try set empty LDFLAGS but I have error:
ld: unknown option: --start-group
|
Ok, this is bit worse It will require some changes in the Makefile itself... I'll have a look at it ASAP and send you the updated file.
Honza
|
|
|
Re: MacOS ide make problem [message #28564 is a reply to message #28561] |
Tue, 07 September 2010 12:50   |
|
Ok, here is a new Makefile, hopefully fixing the problem with grouping 
BTW: Feel free to contact me on icq, irc or google talk, it makes the communication and fixes way faster 
Honza
-
Attachment: Makefile
(Size: 23.50KB, Downloaded 507 times)
|
|
|
|
Re: MacOS ide make problem [message #28628 is a reply to message #28625] |
Wed, 08 September 2010 15:42   |
|
The errors you get mean that the linker didn't find the X11 libraries. Do you have it installed on your machine? It should be available on mac since Mac OS X 10.3, at least that is what I understand from this page: http://developer.apple.com/opensource/tools/runningx11.html. Have a look there, it looks like a very good source of information.
If you have it installed or when you install it, you might have to change the library paths using LIBPATHS="...". But if I am not mistaken the "/usr/X11R6/lib" that is already in defaults should be sufficient.
Honza
PS: There is of course also second, better option: Finish the port to use native mac environment
|
|
|
|
Re: MacOS ide make problem [message #28952 is a reply to message #28519] |
Wed, 29 September 2010 08:47  |
lundman
Messages: 175 Registered: March 2006 Location: Tokyo
|
Experienced Member |
|
|
I did all the OSX work a couple of years back, and I still use the old version of ide since I have had no reason to upgrade. Shame there has been to updates for OSX since then.
|
|
|
Goto Forum:
Current Time: Sat May 03 01:48:50 CEST 2025
Total time taken to generate the page: 0.00795 seconds
|
|
|