Hi,
I've almost managed to build and package C::B nightly on Mac OS (arm64), I think I've sorted out most of the issues, but I need help for the final application bundling.
This is the process so far:
- Using all gcc tools from homebrew
- Using pre-built wx 3.1.7 also from homebrew
- then run:
#!/bin/zsh
# download nightly
#svn checkout svn://svn.code.sf.net/p/codeblocks/code/trunk
# prepare installation
cd trunk
# homebrew wxwidgets is not globally installed: add here
ACLOCAL_FLAGS="-I /opt/homebrew/share/wx/3.1/aclocal" ./bootstrap
# remove plugins that depend on stuff that doesn't build
./configure --prefix=/Users/federico/Downloads/codeblocks/nightly/test_build --with-contrib-plugins=all,-NassiShneiderman,-FileManager --enable-fortran --enable-debug
# build
make -j12
make install
# package
cd /Users/federico/Downloads/codeblocks/nightly/test_build/share/codeblocks/osx_bundle
sh ./bundle.sh
The bundle script can't copy/change name some DLLs:
./bundle.sh: line 29: 88312 Killed: 9 install_name_tool -change $dep @executable_path/$(basename $dep) $1
./bundle.sh: line 29: 88323 Killed: 9 install_name_tool -change $oldlink "@executable_path/$current_dep" $1
./bundle.sh: line 29: 88334 Killed: 9 install_name_tool -change $oldlink "@executable_path/$current_dep" $1
./bundle.sh: line 29: 88345 Killed: 9 install_name_tool -change $oldlink "@executable_path/$current_dep" $1
./bundle.sh: line 29: 88356 Killed: 9 install_name_tool -change $oldlink "@executable_path/$current_dep" $1
./bundle.sh: line 29: 88367 Killed: 9 install_name_tool -change $oldlink "@executable_path/$current_dep" $1
./bundle.sh: line 29: 88378 Killed: 9 install_name_tool -change $oldlink "@executable_path/$current_dep" $1
./bundle.sh: line 29: 88389 Killed: 9 install_name_tool -change $oldlink "@executable_path/$current_dep" $1
./bundle.sh: line 29: 88400 Killed: 9 install_name_tool -change $oldlink "@executable_path/$current_dep" $1
./bundle.sh: line 29: 88411 Killed: 9 install_name_tool -change $oldlink "@executable_path/$current_dep" $1
./bundle.sh: line 29: 88422 Killed: 9 install_name_tool -change $oldlink "@executable_path/$current_dep" $1
so that when I try to run the code blocks application it crashes on segfault (due to missing DLLs I think).
Could anybody help?
Thank you,
Federico
Ok I think I've sorted that out.
When using the pre-built homebrew wx library, the packaging manager had troubles with the signature of those libraries,
with errors like
install_name_tool: warning: changes being made to the file will invalidate the code signature in: ...
(see for example at https://gitlab.kitware.com/cmake/cmake/-/issues/21854 (https://gitlab.kitware.com/cmake/cmake/-/issues/21854))
Of course when I was launching C::B directly from /src/devel31/bin, there was no issue because the original libraries in /opt/homebrew were used; this
was only an issue with the package because the executable dependencies are re-written to search for dynamic libraries in @executable_path only.
Now, with self-built wxWidgets, everything works OK. Next step will be to try build the Fortran plugin, which has a broken unix makefile...