Re: [Jsource] compilation from sources on OpenBSD, amd64, noavx

2018-06-07 Thread bill lam
  if. UNAME -: 'Linux' do.
 cpu=. 2!:0 'cat /proc/cpuinfo'

Apparently, the base library guarded non-Linux system
from execution these sentences. I think you
need to add a line
UNAME_z_=: 'OpenBSD' 
to the begining of your profile.ijs as a kludge.
Of course there will be other issues since base
library has no support for OpenBSD. 

I think this can not be half done, you need to 
spend some time to modify base library to
support OpenBSD. As a rough estimate, you can
grep all occurrence of the word 'Android' in
base library, those are places that you needed
to work. May be a few more but not many.

Чт, 07 июн 2018, Rudolf Sykora написал(а):
> Hello,
> 
> On 6 June 2018 at 15:15, bill lam  wrote:
> > try comment out this line
> >
> >  'libc.so.6 setlocale > x i *c'&(15!:0)^:(UNAME-:'Linux')1;,'C'
> >
> >> odin$ cd soft/jsource/jbld/j64/bin
> >> odin$ ./jconsole
> >> |domain error: boot
> >> |   'libc.so.6 setlocale > x i *c'&(15!:0)^:(UNAME-:'Linux')1;,'C'
> >>install'all'
> >> |value error: install
> >> |   install'all'
> >>
> 
> 
> odin$ find . -exec grep 'libc.so.6 setlocale' {} /dev/null \;
> ./jlibrary/system/main/stdlib.ijs:'libc.so.6 setlocale > x i
> *c'&(15!:0)^:(UNAME-:'Linux') 1;,'C'
> ./jbld/j32/system/main/stdlib.ijs:'libc.so.6 setlocale > x i
> *c'&(15!:0)^:(UNAME-:'Linux') 1;,'C'
> ./jbld/j64/system/main/stdlib.ijs:'libc.so.6 setlocale > x i
> *c'&(15!:0)^:(UNAME-:'Linux') 1;,'C'
> 
> So I commented out the line in the jlibrary and j64 directories.
> (Why are there two?! Which one is really relevant?)
> But that gives:
> 
> odin$ ./jconsole
> cat: /proc/cpuinfo: No such file or directory
> |interface error: boot
> |   cpu=.2!:0'cat /proc/cpuinfo'
> 
> 
> after which I can issue commands to j
> .
> OpenBSD does not use /proc/cpuinfo.
> 
> Anyway. These errors / warnings (?) probably just mean that my path
> of compiling /setting up j on OpenBSD is suboptimal (so far it has
> been just a hack).
> 
> Thanks
> Ruda
> --
> For information about J forums see http://www.jsoftware.com/forums.htm

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
gpg --keyserver subkeys.pgp.net --armor --export 4434BAB3
--
For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jsource] compilation from sources on OpenBSD, amd64, noavx

2018-06-07 Thread Rudolf Sykora
On 7 June 2018 at 10:00, bill lam  wrote:
>> OpenBSD does not use /proc/cpuinfo.
> what is the equivalent in OpenBSD?

Afaik, it depends on what you want to know.

sysctl command (in the base) provides some info, e.g.

odin$ sysctl hw.model
hw.model=Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz

Then there is dmidecode, but that is not in the base OpenBSD system:

dmidecode -t processor

Ruda
--
For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jsource] compilation from sources on OpenBSD, amd64, noavx

2018-06-07 Thread Rudolf Sykora
Hello,

On 6 June 2018 at 14:43, bill lam  wrote:
> I think your boot sequence had never completed to load base library.
> ...
> you need to confirm if booting process can run fine.

How can I check that 'booting process can run fine' Is
there a sequence of tests I can perform?

In jconsole I can get, e.g.:

>4!:3''
/home/ruda/soft/jsource/jbld/j64/bin/profile.ijs
/home/ruda/soft/jsource/jbld/j64/system/util/boot.ijs
/home/ruda/soft/jsource/jbld/j64/system/main/stdlib.ijs


but e.g.
 1!:43 y
1!:43 y

and no install, jpath are available...

Thanks
Ruda
--
For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jsource] compilation from sources on OpenBSD, amd64, noavx

2018-06-06 Thread Raul Miller
You only need to replace the machine specific files. You may need to
deal with the file extension used for libraries.

This should give you and idea (run this in the top level directory of
a j install):

find . | xargs file | grep x86_64

At minimum, you'll want to replace bin/jconsole and libj

Thanks,

-- 
Raul
On Wed, Jun 6, 2018 at 9:13 AM Rudolf Sykora  wrote:
>
> On 6 June 2018 at 14:47, chris burke  wrote:
> >
> > You should be able to get a normal J installation and just replace the
> > binary.
>
> Do you mean that I could grab a working installation, say from linux,
> and then just replace a few files? Is it clear which?
>
> Thanks
> Ruda
> --
> For information about J forums see http://www.jsoftware.com/forums.htm
--
For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jsource] compilation from sources on OpenBSD, amd64, noavx

2018-06-06 Thread Raul Miller
install is defined in system/main/stdlib.ijs:

$ bin/jconsole
   ;(4!:3''){~4!:4<'install'
/Users/rauldmiller/j64-807/system/main/stdlib.ijs

You'll want to get that working before you install packages.

Thanks,

-- 
Raul

On Wed, Jun 6, 2018 at 9:10 AM Rudolf Sykora  wrote:
>
> On 6 June 2018 at 14:34, Raul Miller  wrote:
> > But before that, I'd start bin/jconsole and try install from there.
> > (I'd also probably try install'all')
>
> I had tried it before from jconsole...
>
> odin$ cd soft/jsource/jbld/j64/bin
> odin$ ./jconsole
> |domain error: boot
> |   'libc.so.6 setlocale > x i *c'&(15!:0)^:(UNAME-:'Linux')1;,'C'
>install'all'
> |value error: install
> |   install'all'
>
>
> > Also.. presumably you've got a running jqt instance on another system
> > that you can compare against?
>
> not now
>
> Thanks
> Ruda
> --
> For information about J forums see http://www.jsoftware.com/forums.htm
--
For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jsource] compilation from sources on OpenBSD, amd64, noavx

2018-06-06 Thread Rudolf Sykora
On 6 June 2018 at 14:47, chris burke  wrote:
>
> You should be able to get a normal J installation and just replace the
> binary.

Do you mean that I could grab a working installation, say from linux,
and then just replace a few files? Is it clear which?

Thanks
Ruda
--
For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jsource] compilation from sources on OpenBSD, amd64, noavx

2018-06-06 Thread Rudolf Sykora
On 6 June 2018 at 14:34, Raul Miller  wrote:
> But before that, I'd start bin/jconsole and try install from there.
> (I'd also probably try install'all')

I had tried it before from jconsole...

odin$ cd soft/jsource/jbld/j64/bin
odin$ ./jconsole
|domain error: boot
|   'libc.so.6 setlocale > x i *c'&(15!:0)^:(UNAME-:'Linux')1;,'C'
   install'all'
|value error: install
|   install'all'


> Also.. presumably you've got a running jqt instance on another system
> that you can compare against?

not now

Thanks
Ruda
--
For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jsource] compilation from sources on OpenBSD, amd64, noavx

2018-06-06 Thread chris burke
The profile should be loaded by default, see
http://jsoftware.com/help/user/cmdline.htm and subsequent pages. It loads
the base library, which includes 'install' and 'require'.

For the meaning of ~ see
http://code.jsoftware.com/wiki/Guides/Folders_and_Projects .

You should be able to get a normal J installation and just replace the
binary.


On Wed, Jun 6, 2018 at 5:43 AM, bill lam  wrote:

> I think your boot sequence had never completed to load base library.
>
> jqt term can run without any profile , but of course those definitions in
> base library will be unavailable. try
> ./jqt -jprofile
>
> to see the behavior familiar or not.
>
> you need to confirm if booting process can run fine.
>
>
--
For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jsource] compilation from sources on OpenBSD, amd64, noavx

2018-06-04 Thread Rudolf Sykora
Dear Stepvhen,


> I also run OpenBSD and thanks to Rudolf's post I was able to compile the
> jsource and do some of my own investigating.
> ...
> the diff for current jsource git is here: https://pastebin.com/raw/BJERtG58

thanks for the information and the diff.
I will try it soon, I hope.

Just: have you also tried to put together jqt on OpenBSD?
(When I tried a month ago I weren't successfull...)

Thanks
Ruda
--
For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jsource] compilation from sources on OpenBSD, amd64, noavx

2018-04-13 Thread bill lam
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  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

Re: [Jsource] compilation from sources on OpenBSD, amd64, noavx

2018-04-13 Thread bill lam
unless you are using European locales, you can ignore that line.



On Fri, Apr 13, 2018, 8:54 PM Rudolf Sykora  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

[Jsource] compilation from sources on OpenBSD, amd64, noavx

2018-04-13 Thread Rudolf Sykora
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