Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[9fans] trying to populate arm tree

41 views
Skip to first unread message

James Chapman

unread,
Jan 28, 2013, 7:46:38 AM1/28/13
to
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

unread,
Jan 28, 2013, 9:32:46 AM1/28/13
to
On Monday 28 January 2013 14.46.38 James Chapman wrote:

>
> 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

unread,
Jan 28, 2013, 9:53:57 AM1/28/13
to
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]
--
Federico G. Benavento

Federico G. Benavento

unread,
Jan 28, 2013, 10:07:13 AM1/28/13
to
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
--
Federico G. Benavento

James Chapman

unread,
Jan 28, 2013, 10:30:36 AM1/28/13
to

On Jan 28, 2013, at 4:53 PM, "Federico G. Benavento" <bena...@gmail.com> wrote:

> 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

James Chapman

unread,
Jan 28, 2013, 10:38:01 AM1/28/13
to

On Jan 28, 2013, at 5:07 PM, "Federico G. Benavento" <bena...@gmail.com> wrote:

> 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
> ---
>>
>

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!

erik quanstrom

unread,
Jan 28, 2013, 10:32:34 AM1/28/13
to
> 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

unread,
Jan 28, 2013, 10:53:37 AM1/28/13
to
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?
---
Federico G. Benavento
bena...@gmail.com

Jacob Todd

unread,
Jan 28, 2013, 11:25:55 AM1/28/13
to
This is fixed in 9front, if someone wanted to pull in the fixes.

Matthew Veety

unread,
Jan 28, 2013, 11:40:10 AM1/28/13
to
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.

Federico G. Benavento

unread,
Jan 28, 2013, 11:40:58 AM1/28/13
to
what is fixed?

Federico G. Benavento

unread,
Jan 28, 2013, 11:47:19 AM1/28/13
to
>
> It gets further but fails here:
>
> /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

James Chapman

unread,
Jan 28, 2013, 12:20:57 PM1/28/13
to
On Jan 28, 2013, at 6:47 PM, Federico G. Benavento <bena...@gmail.com> wrote:
>> It gets further but fails here:
>> /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

unread,
Jan 28, 2013, 12:40:07 PM1/28/13
to
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

erik quanstrom

unread,
Jan 28, 2013, 1:21:09 PM1/28/13
to
On Mon Jan 28 12:41:01 EST 2013, j...@corpus-callosum.com wrote:
> A few things to note:
>
> - 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

unread,
Jan 28, 2013, 1:26:33 PM1/28/13
to

On Jan 28, 2013, at 3:21 PM, erik quanstrom <quan...@quanstro.net> wrote:

> or anything that's not x86.

I have openssl-1.0.1c it builds on arm too...

Federico G. Benavento

unread,
Jan 28, 2013, 3:14:48 PM1/28/13
to

On Jan 28, 2013, at 5:10 PM, erik quanstrom <quan...@quanstro.net> wrote:

> On Mon Jan 28 13:27:19 EST 2013, bena...@gmail.com wrote:
>>
>> On Jan 28, 2013, at 3:21 PM, erik quanstrom <quan...@quanstro.net> wrote:
>>
>>> 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 :)

erik quanstrom

unread,
Jan 28, 2013, 3:10:55 PM1/28/13
to
On Mon Jan 28 13:27:19 EST 2013, bena...@gmail.com wrote:
>
> On Jan 28, 2013, at 3:21 PM, erik quanstrom <quan...@quanstro.net> wrote:
>
> > 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

unread,
Jan 29, 2013, 5:02:52 PM1/29/13
to
> 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.

Richard Miller

unread,
Jan 29, 2013, 5:07:43 PM1/29/13
to
> - 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.

0 new messages