openbsd is not linux. whenever something in J that are specific for Linux,
eg UNAME or hostdef , you need to be alert. It is better for testing by
adding a new platform OpenBSD to discover more places that need fixing.
That said I'm afraid that will not be supported officially.

did cmd uname report Linux? or uname unavailable in OpenBSD?

On Fri, Apr 13, 2018, 8:54 PM Rudolf Sykora <rudolf.syk...@gmail.com> wrote:

> Hello,
>
> I tried to compile jconsole + libj + libtsdll under OpenBSD.
> I managed (although I had to be hard; I seem to dislike the
> build system a lot).
>
> When I run jconsole now, I get the message
>
> |domain error: boot
> |       'libc.so.6 setlocale > x i *c'&(15!:0)^:(UNAME-:'Linux')1;,'C'
>
> (it originates from system/main/stdlib.ijs)
>
> Thus probably I still had to change something.
> Can anybody comment on this?
>
> For me there are too many #define in the sources at too many
> places... (j.h js.h x15.c)
>
> Thanks
> Ruda
>
> ------
> PS.:
> So far I (probably not comprehensive, just for reference; not polished at
> all):
>
> 1) change #!/bin/bash to #!/bin/sh in the building scripts
>
> 2) keep jvars.sh inside the building tree, source it once to
> the shell that will be used for the building
> (and do not source it again anywhere)
>
> 2.5) put to jvars.sh:
> jplatform=openbsd
> and export it at the end
>
> 2.6) add to jsrc/js.h info about OPENBSD (what is really needed apart from
> finally having SY_64 1??)
> #define SYS_OPENBSD          8388608L
>
> #define SYS_UNIX            (SYS_ATT3B1 + SYS_DEC5500 + SYS_IBMRS6000 + \
>                              SYS_MIPS + SYS_NEXT + SYS_SGI + SYS_SUN3 + \
>                              SYS_SUN4 + SYS_VAX + SYS_LINUX + SYS_MACOSX +
> \
>                              SYS_FREEBSD + SYS_NETBSD + SYS_SUNSOL2 +
> SYS_HPUX+ \
>             SYS_OPENBSD)
>
> #define SYS SYS_OPENBSD      ...just before testing if SYS is defined
> (towards the end)
>
> 3) run gmake instead of make (domake.sh)
>
> 4) change the line in build_libj.sh to:
> if [ $($CC -v 2>&1 | grep -E -c "clang\ version|Apple\ LLVM\ version")
> -eq 1 ] ; then
> or just say it'll be clang for us
> or sth like (?)
> if [ $CC -v 2>&1 | grep -E  "clang version|Apple LLVM version"  ] ; then
>
> and add to this file
>
> openbsd_j64) # nonavx here
> TARGET=libj.so
> COMPILE="$common"
> LINK=" -shared -Wl,-soname,libj.so -lm  $LDOPENMP -o libj.so "
>
> 5) add to build_tsdll.sh
> openbsd_j64)
> TARGET=libtsdll.so
> COMPILE="$common "
> LINK=" -shared -Wl,-soname,libtsdll.so -o libtsdll.so "
>
> 6) add to build_jconsole.sh
> openbsd_j64)
> COMPILE="$common"
> LINK=" -o jconsole "
>
> 7) ?should we also change this (have not done for now) in x15.c?
> #define SY_UNIX64 (SY_64 && (SY_LINUX || SY_MAC || SY_FREEBSD))
> to something like
> #define SY_UNIX64 (SY_64 && (SY_LINUX || SY_MAC || SY_FREEBSD ||
> SY_OPENBSD))
> and define SY_OPENBSD somewhere?
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to