Home » Developing U++ » U++ Developers corner » Compilation on Mac
Re: Compilation on Mac [message #59464 is a reply to message #59463] |
Mon, 02 January 2023 10:24   |
brown
Messages: 8 Registered: July 2015 Location: Budapest
|
Promising Member |
|
|
thx. I forked the master, and I will try to integrate your branch too mine as well. I did focus the configuration and AppKit/objc too. Slightly offtopic here, but:
I have strategic questions mainly.
- are the .mm files objc files ? Is it documented what are the goals there? I wrote a test.cpp and test.mm and tried to compile it, and got errors with MacOs13.1 Sdk. So, I am wondering how you could compile these nowadays...
-this project doesn't use autoconf, and unused libs are not disabled automatically or command line way, rather it tries to remove the pkg-config --libs part with sed. So, is it a strategy here to manage library depandancies , in example if someone installed libpng or not?
- Finding1: only the lib part is removed by sed, but --cflag part is not consistent with those.
- Finding2: the text is not matching at --cflag replacement line, because of the makefiles content has been changed meanwhile.
My version of configure_makefile contains this now (but this is not the final version, probably it could be a base for further discussions):
if [[ "$uname" == 'Darwin' ]]; then
echo Configuring $1 for MacOS
# sed -i.bak 's/\`pkg-config --cflags libpng\` \`pkg-config --cflags freetype2\` \`pkg-config --cflags x11\` \`pkg-config --cflags fontconfig\` \`pkg-config --cflags xcb\` \`pkg-config --cflags expat\`/ /' $1
`pkg-config --exists libpng` || sed -i.bak 's/\`pkg-config --cflags libpng\`/ /' $1
`pkg-config --exists freetype2` || sed -i.bak 's/\`pkg-config --cflags freetype2\`/ /' $1
`pkg-config --exists x11` || sed -i.bak 's/\`pkg-config --cflags x11\`/ /' $1
`pkg-config --exists xinerama` || sed -i.bak 's/\`pkg-config --cflags xinerama\`/ /' $1
`pkg-config --exists xrender` || sed -i.bak 's/\`pkg-config --cflags xrender\`/ /' $1
`pkg-config --exists xft` || sed -i.bak 's/\`pkg-config --cflags xft\`/ /' $1
`pkg-config --exists xdmcp` || sed -i.bak 's/\`pkg-config --cflags xdmcp\`/ /' $1
`pkg-config --exists xext` || sed -i.bak 's/\`pkg-config --cflags xext\`/ /' $1
`pkg-config --exists gtk+3.0` || sed -i.bak 's/\`pkg-config --cflags gtk+-3.0\`/ /' $1
`pkg-config --exists libnotify` || sed -i.bak 's/\`pkg-config --cflags libnotify\`/ /' $1
`pkg-config --exists fontconfig` || sed -i.bak 's/\`pkg-config --cflags fontconfig\`/ /' $1
`pkg-config --exists xcb` || sed -i.bak 's/\`pkg-config --cflags xcb\`/ /' $1
`pkg-config --exists expat` || sed -i.bak 's/\`pkg-config --cflags expat\`/ /' $1
sed -i.bak 's/-Wl,--gc-sections $(LINKOPTIONS)/$(LINKOPTIONS)/' $1
sed -i.bak 's/$(LINKER) -o "$(OutFile)" -Wl,-s $(LIBPATH) -Wl,-O,2 $(LDFLAGS) -Wl,--start-group/$(LINKER) -o "$(OutFile)" $(LIBPATH) $(LDFLAGS)/' $1
`pkg-config --exists libpng` || sed -i.bak 's/\`pkg-config --libs libpng\`/ /' $1
`pkg-config --exists freetype2` || sed -i.bak 's/\`pkg-config --libs freetype2\`/ /' $1
`pkg-config --exists x11` || sed -i.bak 's/\`pkg-config --libs x11\`/ /' $1
`pkg-config --exists fontconfig` || sed -i.bak 's/\`pkg-config --libs fontconfig\`/ /' $1
`pkg-config --exists xcb` || sed -i.bak 's/\`pkg-config --libs xcb\`/ /' $1
`pkg-config --exists expat` || sed -i.bak 's/\`pkg-config --libs expat\`/ /' $1
sed -i.bak 's/-lrt / /' $1
sed -i.bak 's/-Wl,--end-group/ /' $1
fi
My sandbox is mainly for learn how to help you the best. For example, how can I get your commits before it's merged, etc. Also, even if was able to eliminate all of the compilation errors, I got linker erros. So, first I have to understand how the AppKit c++/objc is working in u++. Therefore I have not plan to provide pr now, but at least I would like to learn what is missing at my sandbox.
(the last released mac binaries are working on my mac, but I am not sure, if it is M2 arch rather it is intel and using some rosetta virtualization on my cpu.. So, before I can help anything, I would like to go through several integration related questions first.)
my fork/sandbox is here: https://github.com/bfarago/ultimatepp/tree/IntegrationTest_o n_Mac_M2
Compare to the master: https://github.com/ultimatepp/ultimatepp/compare/master...bf arago:ultimatepp:IntegrationTest_on_Mac_M2
I did not committed all of my other local changes here, because I've plan to rebase to yours or master branch solution rather.
Happy new year!
|
|
|
 |
|
Compilation on Mac
By: Novo on Fri, 14 October 2022 20:33
|
 |
|
Re: Compilation on Mac
By: brown on Sun, 01 January 2023 02:25
|
 |
|
Re: Compilation on Mac
By: fudadmin on Sun, 01 January 2023 16:54
|
 |
|
Re: Compilation on Mac
By: fudadmin on Mon, 02 January 2023 06:50
|
 |
|
Re: Compilation on Mac
By: brown on Mon, 02 January 2023 10:24
|
 |
|
Re: Compilation on Mac
By: fudadmin on Mon, 02 January 2023 16:21
|
 |
|
Re: Compilation on Mac
By: fudadmin on Mon, 02 January 2023 17:04
|
 |
|
Re: Compilation on Mac
By: brown on Mon, 02 January 2023 18:03
|
 |
|
Re: Compilation on Mac
By: fudadmin on Mon, 02 January 2023 18:51
|
 |
|
Re: Compilation on Mac
By: brown on Tue, 03 January 2023 01:56
|
 |
|
Re: Compilation on Mac
By: fudadmin on Tue, 03 January 2023 02:27
|
 |
|
Re: Compilation on Mac
By: fudadmin on Tue, 03 January 2023 05:59
|
Goto Forum:
Current Time: Wed Apr 30 05:23:16 CEST 2025
Total time taken to generate the page: 0.01570 seconds
|