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 OS » MacOS ide make problem
MacOS ide make problem [message #28519] Sun, 05 September 2010 21:14 Go to next message
rett is currently offline  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 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi Rett!

First of all: The Mac port is (AFAIK) not finished yet. So be prepared for some trouble Wink

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 Wink

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 Go to previous messageGo to next message
rett is currently offline  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 Wink


Ok, may be I can help with testing or some fix Wink

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 Wink


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 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

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 Wink

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 #28552 is a reply to message #28535] Mon, 06 September 2010 19:55 Go to previous messageGo to next message
rett is currently offline  rett
Messages: 15
Registered: January 2010
Promising Member
dolik.rce wrote on 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 Wink

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


I compile in commandline:
make -f uppbox/lpbuild/Makefile CXXFLAGS="-fno-PIC" PKG=ide "FLAGS=GUI GCC SHARED NOGTK" DIRS=uppsrc

Compiled without MT flag and compilation is successful.
So next problem is with linking.
 Preparing output directory structure ...
  Building package ide [TheIDE main package] (473 files in 34 packages, flags: DARWIN GCC GUI MAIN NOGTK POSIX SHARED)
  Linking bin/ide ...
ld: unknown option: --gc-sections
collect2: ld returned 1 exit status
make[1]: *** [bin/ide] Error 1
make: [ide] Error 2 (ignored)
Everything done.



b4b9ef0096f53f85f38f8c84bc5eabec
Re: MacOS ide make problem [message #28553 is a reply to message #28552] Mon, 06 September 2010 20:27 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi Rett,

By compiling "in GUI mode" I meant "with GUI flag", sorry for being imprecise Wink

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" Wink

Honza
Re: MacOS ide make problem [message #28559 is a reply to message #28553] Tue, 07 September 2010 06:51 Go to previous messageGo to next message
rett is currently offline  rett
Messages: 15
Registered: January 2010
Promising Member
dolik.rce wrote on Mon, 06 September 2010 20:27

Hi Rett,

By compiling "in GUI mode" I meant "with GUI flag", sorry for being imprecise Wink

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" Wink

Honza


OK, if something wrong I show images of screen.
Yes, I try set empty LDFLAGS but I have error:
ld: unknown option: --start-group



b4b9ef0096f53f85f38f8c84bc5eabec
Re: MacOS ide make problem [message #28561 is a reply to message #28559] Tue, 07 September 2010 10:24 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

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 Smile 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 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Ok, here is a new Makefile, hopefully fixing the problem with grouping Wink

BTW: Feel free to contact me on icq, irc or google talk, it makes the communication and fixes way faster Wink

Honza
  • Attachment: Makefile
    (Size: 23.50KB, Downloaded 448 times)
Re: MacOS ide make problem [message #28625 is a reply to message #28564] Wed, 08 September 2010 13:44 Go to previous messageGo to next message
rett is currently offline  rett
Messages: 15
Registered: January 2010
Promising Member
dolik.rce wrote on Tue, 07 September 2010 12:50

Ok, here is a new Makefile, hopefully fixing the problem with grouping Wink

BTW: Feel free to contact me on icq, irc or google talk, it makes the communication and fixes way faster Wink

Honza


thx for help.

in attachment new errors.
  • Attachment: error.txt
    (Size: 36.72KB, Downloaded 558 times)


b4b9ef0096f53f85f38f8c84bc5eabec
Re: MacOS ide make problem [message #28628 is a reply to message #28625] Wed, 08 September 2010 15:42 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

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 Wink
Re: MacOS ide make problem [message #28844 is a reply to message #28519] Sun, 19 September 2010 13:44 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi rett,

Any news about compiling theide on mac? Did you try to install X11? I am very curious Smile

Best regards,
Honza
Re: MacOS ide make problem [message #28952 is a reply to message #28519] Wed, 29 September 2010 08:47 Go to previous message
lundman is currently offline  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.
Previous Topic: 701-dev1 / 2007.1beta on Mac OSX
Next Topic: Compile X11 Source Package
Goto Forum:
  


Current Time: Thu Apr 18 20:43:27 CEST 2024

Total time taken to generate the page: 0.01709 seconds