I'm trying to run OpenFOAM on rumpkernel. At the moment, compilation fails, and I have problem understanding why, and more precisely, how should I modify build procedures to make them rump-compatilble. I guess issues is a wrong place for such novice question, but -I don't know where else could I ask for help.
Basic OpenFOAM (a bit outdated 2.4.0 version) compilation/installation is explained on https://openfoamwiki.net/index.php/Installation/Linux/OpenFOAM-2.4.0/Fedora. They use their wmake utility, since plain make and friends are supposed to be to weak for their requirements. Compilation results on host are a bunch of .so libraries. This works, so I do have prerequisite devel libraries etc on my system.
When trying to compile for rumpkernel, the first thing which fails is utility libPstream.so. I added some 'set -x' to see, which gcc command fails, and then tried to compile libPstream.so only:
cd src/Pstream/dummy/Make/linux64GccDPOpt
wmake # -> error
#
make -f /home/justin_cinkelj/devel/mikelangelo/rumprun-packages/openfoam/build/OpenFOAM-2.4.0/wmake/Makefile MAKE_DIR=Make INCLUDE_DEPS=Make/linux64GccDPOpt/includeDeps libso
/home/justin_cinkelj/devel/mikelangelo/rumprun/./rumprun/libexec/rumprun-x86_64-hw/x86_64--netbsd-gcc -mno-red-zone -no-integrated-cpp --sysroot /home/justin_cinkelj/devel/mikelangelo/rumprun/./rumprun/rumprun-x86_64 -specs=/home/justin_cinkelj/devel/mikelangelo/rumprun/./rumprun/rumprun-x86_64/lib/specs-compile_or_ferment -Wl,-r -Wl,-u,main -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -IlnInclude -I. -I/home/justin_cinkelj/devel/mikelangelo/rumprun-packages/openfoam/build/OpenFOAM-2.4.0/src/OpenFOAM/lnInclude -I/home/justin_cinkelj/devel/mikelangelo/rumprun-packages/openfoam/build/OpenFOAM-2.4.0/src/OSspecific/POSIX/lnInclude -fPIC -shared -Xlinker --add-needed -Xlinker --no-as-needed UPstream.o UIPread.o UOPwrite.o -L/home/justin_cinkelj/devel/mikelangelo/rumprun-packages/openfoam/build/OpenFOAM-2.4.0/platforms/linux64GccDPOpt/lib -o /home/justin_cinkelj/devel/mikelangelo/rumprun-packages/openfoam/build/OpenFOAM-2.4.0/platforms/linux64GccDPOpt/lib/dummy/libPstream.so /home/justin_cinkelj/devel/mikelangelo/rumprun/./rumprun/rumprun-x86_64/share/x86_64-rumprun-netbsd-recipe.s
# succeded, I got ELF 64-bit LSB relocatable for 'file libPstream.so'
/home/justin_cinkelj/devel/mikelangelo/rumprun/./rumprun/libexec/rumprun-x86_64-hw/brprintmetainfo /home/justin_cinkelj/devel/mikelangelo/rumprun-packages/openfoam/build/OpenFOAM-2.4.0/platforms/linux64GccDPOpt/lib/dummy/libPstream.so
/home/justin_cinkelj/devel/mikelangelo/rumprun/./rumprun/libexec/rumprun-x86_64-hw/x86_64--netbsd-gcc -mno-red-zone -no-integrated-cpp --sysroot /home/justin_cinkelj/devel/mikelangelo/rumprun/./rumprun/rumprun-x86_64 -specs=/home/justin_cinkelj/devel/mikelangelo/rumprun/./rumprun/rumprun-x86_64/lib/specs-stub /home/justin_cinkelj/devel/mikelangelo/rumprun-packages/openfoam/build/OpenFOAM-2.4.0/platforms/linux64GccDPOpt/lib/dummy/libPstream.so -o /dev/null
# many errors
/home/justin_cinkelj/devel/mikelangelo/rumprun-packages/openfoam/build/OpenFOAM-2.4.0/platforms/linux64GccDPOpt/lib/dummy/libPstream.so: In function `Foam::UPstream::init(int&, char**&)':
(.text+0x14): undefined reference to `Foam::FatalError'
/home/justin_cinkelj/devel/mikelangelo/rumprun-packages/openfoam/build/OpenFOAM-2.4.0/platforms/linux64GccDPOpt/lib/dummy/libPstream.so: In function `Foam::UPstream::init(int&, char**&)':
(.text+0x2f): undefined reference to `Foam::error::operator()(char const*, char const*, int)'
/home/justin_cinkelj/devel/mikelangelo/rumprun-packages/openfoam/build/OpenFOAM-2.4.0/platforms/linux64GccDPOpt/lib/dummy/libPstream.so: In function `Foam::UPstream::init(int&, char**&)':
...
Is the last command trying to assemble the binary for rumprun-bake step, and fails as required libs are missing? In tutorial (https://github.com/rumpkernel/wiki/wiki/Tutorial:-Building-Rumprun-Unikernels) I saw only compilation of single-file app. Now, with complex multi-libs app, I don't know what is build system supposed to do.
I'm trying to run OpenFOAM on rumpkernel. At the moment, compilation fails, and I have problem understanding why, and more precisely, how should I modify build procedures to make them rump-compatilble. I guess issues is a wrong place for such novice question, but -I don't know where else could I ask for help.
Basic OpenFOAM (a bit outdated 2.4.0 version) compilation/installation is explained on https://openfoamwiki.net/index.php/Installation/Linux/OpenFOAM-2.4.0/Fedora. They use their wmake utility, since plain make and friends are supposed to be to weak for their requirements. Compilation results on host are a bunch of .so libraries. This works, so I do have prerequisite devel libraries etc on my system.
When trying to compile for rumpkernel, the first thing which fails is utility libPstream.so. I added some 'set -x' to see, which gcc command fails, and then tried to compile libPstream.so only:
Is the last command trying to assemble the binary for rumprun-bake step, and fails as required libs are missing? In tutorial (https://github.com/rumpkernel/wiki/wiki/Tutorial:-Building-Rumprun-Unikernels) I saw only compilation of single-file app. Now, with complex multi-libs app, I don't know what is build system supposed to do.