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 » Cross-compilation for MacOS on Linux
Cross-compilation for MacOS on Linux [message #56100] Sun, 24 January 2021 14:22 Go to next message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
I'm trying to set up cross-compilation for MacOS on Linux using osxcross.
I'm able to compile code using COMMON_FLAGS = "OSX POSIX BSD".
But linker is still using libraries for Linux.

 -lX11
 -lXinerama
 -lXrender -lX11
 -lXft
 -lXdmcp
 -lfontconfig -lfreetype
 -lxcb
 -lXext
 -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0
 -lnotify -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0
 -lexpat
 -lpng16 -lz
 -lz -lpthread


Could you fix that, please?

TIA


Regards,
Novo
Re: Cross-compilation for MacOS on Linux [message #56185 is a reply to message #56100] Thu, 04 February 2021 20:41 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Are you using umk or makefile?
Re: Cross-compilation for MacOS on Linux [message #56188 is a reply to message #56185] Thu, 04 February 2021 21:29 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
mirek wrote on Thu, 04 February 2021 14:41
Are you using umk or makefile?

umk.
I believe this can be done similar to porting clang-mingw to Linux.
I had same problem back then.


Regards,
Novo
Re: Cross-compilation for MacOS on Linux [message #56199 is a reply to message #56188] Sun, 07 February 2021 18:31 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Hopefully fixed.
Re: Cross-compilation for MacOS on Linux [message #56204 is a reply to message #56199] Mon, 08 February 2021 19:29 Go to previous message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
mirek wrote on Sun, 07 February 2021 12:31
Hopefully fixed.

Thanks a lot!
Interestingly, this change broke compilation. Depending on passed common flags I get different error messages.
For "OSX POSIX BSD" I get
Error executing /home/ssg/dvlp/cpp/code/lang/osxcross/target/bin/o64-clang++ -c -I/usr/include/freetype2 -I/usr/include/libpng16

I believe POSIX and BSD are not supposed to be used in this case.
And for the plain OSX I get
osxcross: warning: cannot find clang intrinsic headers; please report this issue to the OSXCross project

I didn't get this error message before ...
The problem was introduced in a commit uppsrc: MacOS 11.2 fixes
The change:
Vector<String> SplitDirs(const char *s) {
#ifdef PLATFORM_POSIX
	return Split(s, [](int c) { return findarg(c, ';', ':') >= 0 ? c : 0; });
#else
	return Split(s, ';');
#endif
}

This is weird.
If I restore previous
return Split(s, ';');

I get a linker problem:
Undefined symbols for architecture x86_64:
  "Upp::PdfDraw__initializer()", referenced from:
      Upp::PdfDraw__initialize_struct::PdfDraw__initialize_struct() in CtrlLib$blitz.o
  "Upp::PdfDraw::DrawLineOp(int, int, int, int, int, Upp::Color)", referenced from:
      vtable for Upp::PrinterDraw in CtrlLib$blitz.o
  "Upp::PdfDraw::DrawRectOp(int, int, int, int, Upp::Color)", referenced from:
      vtable for Upp::PrinterDraw in CtrlLib$blitz.o
  "Upp::PdfDraw::DrawTextOp(int, int, int, unsigned short const*, Upp::Font, Upp::Color, int, int const*)", referenced from:
      vtable for Upp::PrinterDraw in CtrlLib$blitz.o
...

Compilation is fine in this case ...


Regards,
Novo
Previous Topic: Compilation of umk & theide using Makefile
Next Topic: I cant compile sound example....
Goto Forum:
  


Current Time: Thu Mar 28 22:19:03 CET 2024

Total time taken to generate the page: 0.02483 seconds