DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 6 Days Ago
gpatrick gpatrick is offline
Package Pilot
 
Join Date: Nov 2009
Posts: 208
Default 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
Running
Code:
./configure Calculator
is successful, but when I run
Code:
make
It runs for a while then stops with
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)
$
system.c contains this beginning on line 112:
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; 6 Days Ago at 09:10 PM.
Reply With Quote
  #2   (View Single Post)  
Old 6 Days Ago
ibara's Avatar
ibara ibara is offline
WR Slowest SNOBOL4 laptop
 
Join Date: Jan 2014
Posts: 514
Default

PATH_MAX is defined in sys/syslimits.h

The website http://bxr.su/ is your friend in these cases.
Reply With Quote
  #3   (View Single Post)  
Old 1 Day Ago
gpatrick gpatrick is offline
Package Pilot
 
Join Date: Nov 2009
Posts: 208
Default

I finally found some time to get back to this and adding that solved it. Thank you.
Reply With Quote
  #4   (View Single Post)  
Old 1 Day Ago
ibara's Avatar
ibara ibara is offline
WR Slowest SNOBOL4 laptop
 
Join Date: Jan 2014
Posts: 514
Default

Ah. There is a simpler fix.
On line 45 of that system.c file, change:
Code:
#if defined(FREEBSD) || defined(NETBSD)
to:
Code:
#if defined(FREEBSD) || defined(NETBSD) || defined(OPENBSD)
and remove the #include <sys/syslimits.h> line you added.

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!
Reply With Quote
  #5   (View Single Post)  
Old 1 Day Ago
gpatrick gpatrick is offline
Package Pilot
 
Join Date: Nov 2009
Posts: 208
Default

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)
Reply With Quote
  #6   (View Single Post)  
Old 1 Day Ago
ibara's Avatar
ibara ibara is offline
WR Slowest SNOBOL4 laptop
 
Join Date: Jan 2014
Posts: 514
Default

Wow. I'll try to reproduce but that's a straight-up clang/llvm bug there.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:39 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick