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  |
Novo
Messages: 1430 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 #56188 is a reply to message #56185] |
Thu, 04 February 2021 21:29   |
Novo
Messages: 1430 Registered: December 2006
|
Ultimate Contributor |
|
|
mirek wrote on Thu, 04 February 2021 14:41Are 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 #56204 is a reply to message #56199] |
Mon, 08 February 2021 19:29  |
Novo
Messages: 1430 Registered: December 2006
|
Ultimate Contributor |
|
|
mirek wrote on Sun, 07 February 2021 12:31Hopefully 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
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
|
|
|
Goto Forum:
Current Time: Fri Apr 25 12:25:17 CEST 2025
Total time taken to generate the page: 0.00955 seconds
|