Discussion:
[9fans] trying to populate arm tree
(too old to reply)
James Chapman
2013-01-28 12:46:38 UTC
Permalink
Hi,

I would like to boot my 9pi using an fs from a 386 based cpu/auth/fossil server.

I have previously installed:

fgb/z
fgb/bz2
fgb/openssl
bichued/python
stallion/mercurial

and go from the development repo, and I was planning on putting kertex on there too.

I tried cpuing into the server and running

cpu% cd /sys/src
cpu% objtype=arm mk install

The build fails with a lot of cpp errors about /sys/include/ape/openssl/*.h

about unknown object type.

How can i exclude openssl from the build?

I'm assuming I won't be able to build it. I can put up with cpuing in to run the extra stuff I have installed.

I tried adding openssl to BUGGERED in /sys/src/cmd/mkfile but this didn't help.

James
Jens Staal
2013-01-28 14:32:46 UTC
Permalink
Post by James Chapman
The build fails with a lot of cpp errors about /sys/include/ape/openssl/*.h
about unknown object type.
How can i exclude openssl from the build?
I'm assuming I won't be able to build it. I can put up with cpuing in to run
the extra stuff I have installed.
I tried adding openssl to BUGGERED in /sys/src/cmd/mkfile but this didn't help.
James
specifically for this reason, I have repackaged a couple of ports and put "non
core" packages/ports under /sys/src/pkg/$packagename. Because of this, my
/sys/src/ape/lib is clean and I could without problems build for all supported
architectures (could come in handy if I ever want to cross-compile one of my
ports to another architecture) with "mk installall" - with one exception:
/sys/src/ape/lib/ap/mips/lock.c contained functions where the compiler
complained about missing return values.

I have a tarball on my Plan9 machine where I repackaged fgb's openssl to put
the sources in /sys/src/pkg/openssl (and
added a #pragma lib to libssl and libcrypt in a header I think).

My initial plan was to try to build a newer openssl but it was far too
complicated (the tarball contains symlinks that disappear on Plan9 and
Configure required Perl).

If you want I could upload this one.
for libz and libbz2 I can also offer updated ports
can be found at /n/sources/contrib/staal1978/pkg/
Federico G. Benavento
2013-01-28 14:53:57 UTC
Permalink
I fixed openssl, I'll push it when sources is back up again, just
remove the error
from opensslconf.h.

python needs a mkfile rework.

Dec 6 07:52:28 ART 2012
/n/dump/2013/0128/sys/include/ape/openssl/opensslconf.h 6308 [fgb]
87,88d86
< #else
< #error unknown objtype
Jan 22 09:27:24 ART 2008
/n/dump/2012/1206/sys/include/ape/openssl/opensslconf.h 6337 [fgb]
Post by James Chapman
Hi,
I would like to boot my 9pi using an fs from a 386 based cpu/auth/fossil server.
fgb/z
fgb/bz2
fgb/openssl
bichued/python
stallion/mercurial
and go from the development repo, and I was planning on putting kertex on there too.
I tried cpuing into the server and running
cpu% cd /sys/src
cpu% objtype=arm mk install
The build fails with a lot of cpp errors about /sys/include/ape/openssl/*.h
about unknown object type.
How can i exclude openssl from the build?
I'm assuming I won't be able to build it. I can put up with cpuing in to run the extra stuff I have installed.
I tried adding openssl to BUGGERED in /sys/src/cmd/mkfile but this didn't help.
James
--
Federico G. Benavento
Federico G. Benavento
2013-01-28 15:07:13 UTC
Permalink
z and python:

Jan 19 10:46:03 ART 2012 /n/dump/2013/0128/sys/src/ape/lib/z/mkfile 603 [fgb]
39c39
< CFLAGS=-c
---
CFLAGS=-c -D_C99_SNPRINTF_EXTENSION
diff /n/dump/2013/0128/sys/src/cmd/python/Parser/mkfile
/sys/src/cmd/python/Parser/mkfile
40,41c40,41
< ../Objects/obmalloc.$O\
< ../Python/mysnprintf.$O\
---
obmalloc.$O\
mysnprintf.$O\
44a45,50
obmalloc.$O: ../Objects/obmalloc.c
$CC $CFLAGS $prereq
mysnprintf.$O: ../Python/mysnprintf.c
$CC $CFLAGS $prereq
Jan 28 11:23:26 ART 2013 /sys/src/cmd/python/plan9.c 765 [fgb]
8a9,10
#elif defined(Tarm)
#define FPINVAL (1<<8)
Jan 28 11:22:23 ART 2013 /sys/src/cmd/python/pyconfig.h 27800 [fgb]
11a12
#define _C99_SNPRINTF_EXTENSION
On Mon, Jan 28, 2013 at 11:53 AM, Federico G. Benavento
I fixed openssl, I'll push it when sources is back up again, just
remove the error
from opensslconf.h.
python needs a mkfile rework.
Dec 6 07:52:28 ART 2012
/n/dump/2013/0128/sys/include/ape/openssl/opensslconf.h 6308 [fgb]
87,88d86
< #else
< #error unknown objtype
Jan 22 09:27:24 ART 2008
/n/dump/2012/1206/sys/include/ape/openssl/opensslconf.h 6337 [fgb]
Post by James Chapman
Hi,
I would like to boot my 9pi using an fs from a 386 based cpu/auth/fossil server.
fgb/z
fgb/bz2
fgb/openssl
bichued/python
stallion/mercurial
and go from the development repo, and I was planning on putting kertex on there too.
I tried cpuing into the server and running
cpu% cd /sys/src
cpu% objtype=arm mk install
The build fails with a lot of cpp errors about /sys/include/ape/openssl/*.h
about unknown object type.
How can i exclude openssl from the build?
I'm assuming I won't be able to build it. I can put up with cpuing in to run the extra stuff I have installed.
I tried adding openssl to BUGGERED in /sys/src/cmd/mkfile but this didn't help.
James
--
Federico G. Benavento
--
Federico G. Benavento
James Chapman
2013-01-28 15:38:01 UTC
Permalink
Post by Federico G. Benavento
Jan 19 10:46:03 ART 2012 /n/dump/2013/0128/sys/src/ape/lib/z/mkfile 603 [fgb]
39c39
< CFLAGS=-c
---
My z/mkfile already has:

CFLAGS=-c -D_C99_SNPRINTF_EXTENSION

and was already working I think.

James

P.S. Thanks for looking into this!
James Chapman
2013-01-28 15:30:36 UTC
Permalink
Post by Federico G. Benavento
I fixed openssl, I'll push it when sources is back up again, just
remove the error
from opensslconf.h.
python needs a mkfile rework.
Dec 6 07:52:28 ART 2012
/n/dump/2013/0128/sys/include/ape/openssl/opensslconf.h 6308 [fgb]
87,88d86
< #else
< #error unknown objtype
Jan 22 09:27:24 ART 2008
/n/dump/2012/1206/sys/include/ape/openssl/opensslconf.h 6337 [fgb]
I removed the two lines above from /sys/include/ape/openssl/opensslconf.h

It gets further but fails here:

/sys/src/ape/lib/openssl/apps/openssl.c:364[stdin:85783] no return at end of function: main
Federico G. Benavento
2013-01-28 16:47:19 UTC
Permalink
Post by James Chapman
/sys/src/ape/lib/openssl/apps/openssl.c:364[stdin:85783] no return at end of function: main
add -B to CFLAGS in apps/mkfile

---
Federico G. Benavento
***@gmail.com
James Chapman
2013-01-28 17:20:57 UTC
Permalink
Post by Federico G. Benavento
Post by James Chapman
/sys/src/ape/lib/openssl/apps/openssl.c:364[stdin:85783] no return at end of function: main
add -B to CFLAGS in apps/mkfile
Thanks, that did it.

I then had to create a directory /arm/bin/contrib to get contrib/gui to install.

Then python failed so I added it to BUGGERED IN /sys/src/cmd/mkfile. (I haven't tried your changes yet).

Then I got some permission denied errors in /mail/lib trying to overwrite files owned by upas (and group upas), so I added upas to BUGGERED too.

and with that the build finished!

Many thanks,

James
Jeff Sickel
2013-01-28 17:40:07 UTC
Permalink
A few things to note:

- there are a lot of contrib packages that just don't build well on arm
- try to keep /sys/src/ape/lib fairly clean as Richard has with rpi
- I've learned my lesson and brought /sys/src/ape back in line
with sources.
- I have source to build libsec and libmp for ape on sources:
/n/sources/contrib/jas/src/ape-9mpsec.tar.gz
It needs a bit more testing, but does work with my upcoming
Python2.7 release and allows me to gut OpenSSL from the Python
dependency tree.
- we _may_ want to update /sys/src/cmd/bzip2 to a more modern version as
it's very likely that bzwrite.c needs to be brought in line with
the bzip2 1.0.6.

My upcoming Python2.7 port does depend on bzip2 as the bz2module is now
standard. I can use /sys/src/cmd/bzip2/lib but it causes a few python
test failures specific to bzwrite. If someone wants to put the effort
into bringing Russ' old bzip2 port up to current source that would be
great. Otherwise I'll just wrap the APE build of Python with it's own
bzip2 libs.

-jas
Post by James Chapman
Post by Federico G. Benavento
Post by James Chapman
/sys/src/ape/lib/openssl/apps/openssl.c:364[stdin:85783] no return at end of function: main
add -B to CFLAGS in apps/mkfile
Thanks, that did it.
I then had to create a directory /arm/bin/contrib to get contrib/gui to install.
Then python failed so I added it to BUGGERED IN /sys/src/cmd/mkfile. (I haven't tried your changes yet).
Then I got some permission denied errors in /mail/lib trying to overwrite files owned by upas (and group upas), so I added upas to BUGGERED too.
and with that the build finished!
Many thanks,
James
erik quanstrom
2013-01-28 18:21:09 UTC
Permalink
Post by Jeff Sickel
- there are a lot of contrib packages that just don't build well on arm
or anything that's not x86.

- erik
Federico G. Benavento
2013-01-28 18:26:33 UTC
Permalink
Post by erik quanstrom
or anything that's not x86.
I have openssl-1.0.1c it builds on arm too...

---
Federico G. Benavento
***@gmail.com
Federico G. Benavento
2013-01-28 20:14:48 UTC
Permalink
Post by Federico G. Benavento
Post by erik quanstrom
or anything that's not x86.
I have openssl-1.0.1c it builds on arm too...
(have you tested it?)
it was built for the first time a couple of hours ago :)

---
Federico G. Benavento
***@gmail.com
erik quanstrom
2013-01-28 20:10:55 UTC
Permalink
Post by Federico G. Benavento
Post by erik quanstrom
or anything that's not x86.
I have openssl-1.0.1c it builds on arm too...
(have you tested it?)

i don't think anyone said there are no contrib packages
that compile for arm, just that there are a number of
packages—especially ape ports—that either don't compile
or don't run correctly except on x86.

also, there are contrib packages that break other parts
of the system. and contrib packages that can't be rebuilt.

contrib is supposed to be the wild wild west. but it would
be nice to have a list of packages known to comple & run
on all the common arches, and also not break anything else.

- erik
Richard Miller
2013-01-29 22:07:43 UTC
Permalink
Post by Jeff Sickel
- try to keep /sys/src/ape/lib fairly clean as Richard has with rpi
? not sure what you mean by "fairly clean". The rpi port doesn't
touch anything outside /sys/src/9/bcm. Well, just some band-aid fixes
to the usb mouse driver but they're not specific to ARMs.

Richard Miller
2013-01-29 22:02:52 UTC
Permalink
Post by James Chapman
Then I got some permission denied errors in /mail/lib trying to overwrite files owned by upas (and group upas), so I added upas to BUGGERED too.
No need to do that. Just add the user who is going to run the
'mk install' into group upas. It must already be in group sys
or you wouldn't be getting very far.
erik quanstrom
2013-01-28 15:32:34 UTC
Permalink
Post by Federico G. Benavento
python needs a mkfile rework.
i'm afraid it's more serious than that. python is out of date,
only compiles for 386, there are file i/o problems, etc,
it drags along openssh/openssl, and isn't pushed upstream.

jeff is working on a addressing all these issues with the latest
2.x python. it will be put on sources when its ready.

- erik
Federico G. Benavento
2013-01-28 15:53:37 UTC
Permalink
I just compiled it for arm with my changes… haven't tested it though.

lotte% file /arm/bin/python
/arm/bin/python: arm plan 9 executable

how does one get https without openssl, do you have to reimplement
tons of things?
Post by erik quanstrom
Post by Federico G. Benavento
python needs a mkfile rework.
i'm afraid it's more serious than that. python is out of date,
only compiles for 386, there are file i/o problems, etc,
it drags along openssh/openssl, and isn't pushed upstream.
jeff is working on a addressing all these issues with the latest
2.x python. it will be put on sources when its ready.
- erik
---
Federico G. Benavento
***@gmail.com
Jacob Todd
2013-01-28 16:25:55 UTC
Permalink
Post by erik quanstrom
Post by Federico G. Benavento
python needs a mkfile rework.
i'm afraid it's more serious than that. python is out of date,
only compiles for 386, there are file i/o problems, etc,
it drags along openssh/openssl, and isn't pushed upstream.
jeff is working on a addressing all these issues with the latest
2.x python. it will be put on sources when its ready.
- erik
This is fixed in 9front, if someone wanted to pull in the fixes.
Matthew Veety
2013-01-28 16:40:10 UTC
Permalink
If you're using python on arm there are still a lot of issues that need working out. I can give specifics once I get home.
Post by Jacob Todd
Post by erik quanstrom
Post by Federico G. Benavento
python needs a mkfile rework.
i'm afraid it's more serious than that. python is out of date,
only compiles for 386, there are file i/o problems, etc,
it drags along openssh/openssl, and isn't pushed upstream.
jeff is working on a addressing all these issues with the latest
2.x python. it will be put on sources when its ready.
- erik
This is fixed in 9front, if someone wanted to pull in the fixes.
Federico G. Benavento
2013-01-28 16:40:58 UTC
Permalink
what is fixed?
Post by Jacob Todd
Post by erik quanstrom
Post by Federico G. Benavento
python needs a mkfile rework.
i'm afraid it's more serious than that. python is out of date,
only compiles for 386, there are file i/o problems, etc,
it drags along openssh/openssl, and isn't pushed upstream.
jeff is working on a addressing all these issues with the latest
2.x python. it will be put on sources when its ready.
- erik
This is fixed in 9front, if someone wanted to pull in the fixes.
---
Federico G. Benavento
***@gmail.com
Loading...