|
OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD. |
|
Thread Tools | Display Modes |
|
|||
LambdaNative
I've recently started learning Scheme and my ultimate goal (someday) is to build a mobile app with Scheme using LamdaNative which says OpenBSD is supported.
I have OpenBSD 6.2 and installed a number of prerequisite packages such as Code:
freetype autoconf automake gmake latex wget netpbm ps2eps ghostscript wget cmake tgif Code:
./configure Calculator Code:
make Code:
gcc -DOPENBSD -I/usr/X11R6/include -fPIC -c *.c -I/home/ilc/.cache/lambdanative/openbsd/include system.c: In function 'find_directories': system.c:113: error: 'PATH_MAX' undeclared (first use in this function) system.c:113: error: (Each undeclared identifier is reported only once system.c:113: error: for each function it appears in.) ERROR: failed with exit code 1 >> compilation failed BUILD FAILED - configure with verbose option for more information *** Error 1 in /home/ilc/lambdanative (Makefile:2 'all': @ ./make.sh all) $ Code:
#if defined(OPENBSD) || defined(NETBSD) || defined(FREEBSD) char buf[PATH_MAX] if (realpath(cmd_argv[0],buf)) { int i = strlen(buf)-1; while (i>0&&buf[i]!='/') {i--;} if (i>0) buf[i]=0; // check if directory exists? sys_appdir=strdup(buf); sys_dir=strdup(buf); } #endif Last edited by gpatrick; 12th November 2017 at 09:10 PM. |
|
|||
|
|
|||
I finally found some time to get back to this and adding that solved it. Thank you.
|
|
|||
Ah. There is a simpler fix.
On line 45 of that system.c file, change: Code:
#if defined(FREEBSD) || defined(NETBSD) Code:
#if defined(FREEBSD) || defined(NETBSD) || defined(OPENBSD) You should then send this patch upstream. Additionally, you almost certainly want to be compiling with cc(1) instread of gcc(1). There is a hardcoded gcc in these two places: https://github.com/part-cw/lambdanat...st_openbsd#L38 and https://github.com/part-cw/lambdanat...-libraries#L43 I would change them to cc, make sure all those changes still build successfully (they should), and then send all that in as a diff to upstream. Then consider making a port of LambdaNative! |
|
|||
Changing from gcc to cc returned this:
Code:
cc: error: unable to execute command: Segmentation fault (core dumped) cc: error: clang frontend command failed due to signal (use -v to see invocation) OpenBSD clang version 4.0.0 (tags/RELEASE_400/final) (based on LLVM 4.0.0) Target: amd64-unknown-openbsd6.2 Thread model: posix InstalledDir: /usr/bin cc: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script. cc: note: diagnostic msg: *************** PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: cc: note: diagnostic msg: /tmp/_t-univ-bd2164.c cc: note: diagnostic msg: /tmp/_t-univ-bd2164.sh cc: note: diagnostic msg: *************** gmake[1]: *** [makefile:222: _t-univ.o] Error 254 gmake[1]: Leaving directory '/home/ilc/.lambdanative/tmp_install/gambc-v4_7_9/gsc' gmake: *** [makefile:406: all-recursive] Error 1 ERROR: failed with exit code 2 >> gmake -j 9 failed BUILD FAILED - configure with verbose option for more information *** Error 1 in /home/ilc/lambdanative (Makefile:2 'all': @ ./make.sh all) |
|
|||
Wow. I'll try to reproduce but that's a straight-up clang/llvm bug there.
|
Thread Tools | |
Display Modes | |
|
|