Hello,
my name is Dominik Winter and I'm currently writing my bachelor's thesis
about deploying a HTTP relay with the rumpkernel.
The HTTP relay that I must use is written in perl and therefore I need to
get the perl interpreter running inside the rumpkernel.
Unluckily there is not even one appraoch in the internet for perl.
What I tried so far is the following:
1. Build the rumprun toolchain on a x86_64 vanilla netbsd
2. Get the perl source code
3. Run the perl specific Configure with the normal cc (if specifying the
x86_64-rumprun-netbsd-gcc the script breaks because of compiler tests of
try.c)
4. Patching the Makefile by changing CC= x86_64-rumprun-netbsd-gcc and
adding LDFLAGS= -static -sttaic-libgcc -L/root/rumprun/lib/ and
CPPFLAGS=-I/root/rumprun/include
5. When running make this is the gcc command that gets executed:
x86_64-rumprun-netbsd-gcc -o perl -static -static-libgcc
-L/root/rumprun/lib perlmain.o lib/auto/B/B.a
lib/auto/Compress/Raw/Bzip2/Bzip2.a lib/auto/Compress/Raw/Zlib/Zlib.a
lib/auto/Cwd/Cwd.a lib/auto/DB_File/DB_File.a lib/auto/Data/Dumper/Dumper.a
lib/auto/Devel/PPPort/PPPort.a lib/auto/Devel/Peek/Peek.a
lib/auto/Digest/MD5/MD5.a lib/auto/Digest/SHA/SHA.a
lib/auto/Encode/Encode.a lib/auto/Fcntl/Fcntl.a
lib/auto/File/DosGlob/DosGlob.a lib/auto/File/Glob/Glob.a
lib/auto/Filter/Util/Call/Call.a lib/auto/Hash/Util/Util.a
lib/auto/Hash/Util/FieldHash/FieldHash.a lib/auto/I18N/Langinfo/Langinfo.a
lib/auto/IO/IO.a lib/auto/IPC/SysV/SysV.a lib/auto/List/Util/Util.a
lib/auto/MIME/Base64/Base64.a lib/auto/Math/BigInt/FastCalc/FastCalc.a
lib/auto/NDBM_File/NDBM_File.a lib/auto/Opcode/Opcode.a
lib/auto/POSIX/POSIX.a lib/auto/PerlIO/encoding/encoding.a
lib/auto/PerlIO/mmap/mmap.a lib/auto/PerlIO/scalar/scalar.a
lib/auto/PerlIO/via/via.a lib/auto/SDBM_File/SDBM_File.a
lib/auto/Socket/Socket.a lib/auto/Storable/Storable.a
lib/auto/Sys/Hostname/Hostname.a lib/auto/Sys/Syslog/Syslog.a
lib/auto/Tie/Hash/NamedCapture/NamedCapture.a lib/auto/Time/HiRes/HiRes.a
lib/auto/Time/Piece/Piece.a lib/auto/Unicode/Collate/Collate.a
lib/auto/Unicode/Normalize/Normalize.a lib/auto/arybase/arybase.a
lib/auto/attributes/attributes.a lib/auto/mro/mro.a lib/auto/re/re.a
lib/auto/threads/threads.a lib/auto/threads/shared/shared.a
lib/auto/Encode/Byte/Byte.a lib/auto/Encode/CN/CN.a
lib/auto/Encode/EBCDIC/EBCDIC.a lib/auto/Encode/JP/JP.a
lib/auto/Encode/KR/KR.a lib/auto/Encode/Symbol/Symbol.a
lib/auto/Encode/TW/TW.a lib/auto/Encode/Unicode/Unicode.a
lib/auto/Encode/Byte/Byte.a lib/auto/Encode/CN/CN.a
lib/auto/Encode/EBCDIC/EBCDIC.a lib/auto/Encode/JP/JP.a
lib/auto/Encode/KR/KR.a lib/auto/Encode/Symbol/Symbol.a
lib/auto/Encode/TW/TW.a lib/auto/Encode/Unicode/Unicode.a
lib/auto/Encode/Byte/Byte.a lib/auto/Encode/CN/CN.a
lib/auto/Encode/EBCDIC/EBCDIC.a lib/auto/Encode/JP/JP.a
lib/auto/Encode/KR/KR.a lib/auto/Encode/Symbol/Symbol.a
lib/auto/Encode/TW/TW.a lib/auto/Encode/Unicode/Unicode.a
lib/auto/Encode/Byte/Byte.a lib/auto/Encode/CN/CN.a
lib/auto/Encode/EBCDIC/EBCDIC.a lib/auto/Encode/JP/JP.a
lib/auto/Encode/KR/KR.a lib/auto/Encode/Symbol/Symbol.a
lib/auto/Encode/TW/TW.a lib/auto/Encode/Unicode/Unicode.a libperl.a `cat
ext.libs` -lpthread -lm -lcrypt -lutil -lc -lposix
And it will always break with the error: ld: cannot find -lposix
If I remove -lposix from the gcc command I get errors like:
miniperl: In function `Perl_pp_syscall':
undefined reference to `syscall'
....
I can find the libposix.a on my netbsd host from where I try to build, but
if I add -L/usr/lib/ to the gcc command it also breaks with multiple
definition errors.
Any help would be greatly appreciated!!
Kind regards and thank you
Dominik