Re: premature end of data for lang/go package (mips64)

2022-12-13 Thread Stuart Henderson
On 2022-12-13, Janne Johansson  wrote:
> Den sön 11 dec. 2022 kl 17:42 skrev void :
>> Alternatively, is it feasible to build an amd64 vm and cross-compile
>> there, for mips64/octeon?
>
> I think it is. I think I have tried it for simpler stuff but unless I
> am very mistaken you just set GOARCH and fire off the build, then move
> the binary over.

For go, generally yes, though you will have different binaries compared
to a native build. In particular it links with libc differently; native
build records a dependency on the libc version on the machine, go's
crosscompiling just records it as "libc.so" (see objdump -p).

There's no infrastructure for cross-compiling in the ports tree (and it's
not particularly wanted in general) - you might be able to tweak
individual ports to get usable binaries out of them with some languages
and copy them out of the fake-install dir, but producing installable tgz
packages will be trickier.


-- 
Please keep replies on the mailing list.



Re: premature end of data for lang/go package (mips64)

2022-12-12 Thread Janne Johansson
Den sön 11 dec. 2022 kl 17:42 skrev void :
> Alternatively, is it feasible to build an amd64 vm and cross-compile
> there, for mips64/octeon?

I think it is. I think I have tried it for simpler stuff but unless I
am very mistaken you just set GOARCH and fire off the build, then move
the binary over.

-- 
May the most significant bit of your life be positive.



Re: premature end of data for lang/go package (mips64)

2022-12-12 Thread void

On Mon, Dec 12, 2022 at 08:52:28AM -, Stuart Henderson wrote:


Or you maybe able to workaround by downloading the package and installing
it from local atorage rather than over the network.


Yes this worked. After downloading it, ran "pkg_add -v -v -m go-1.19.1p0.tgz"

which installed it. many thanks,
--



Re: premature end of data for lang/go package (mips64)

2022-12-12 Thread void

On Mon, Dec 12, 2022 at 08:52:28AM -, Stuart Henderson wrote:


This *shouldn't* break like this, but it's possible that if writing to
the filesystem is very slow you have a timeout fetching the file. (The go
package has a *lot* of small files and with the default mount options,
creating a lot of new files on slow storage can take a very long time).


The media sustains 11MB/s random write, as tested with dd but the blocksize 
was 1m. It's much slower with 4k or 512 bytes. But I know what you mean, having 
seen the problem with git clone and svn co on (other) usb2 snd sdmmc.

Unfortunately there's no alternative to usb2 on this device.


It might help to mount the filesystem holding /usr/local with the softdep
flag.


Softdeps are turned on for all filesystems apart from swap


Or you maybe able to workaround by downloading the package and installing
it from local atorage rather than over the network.


Hadn't thought of looking for a local switch for pkg_add; thanks for the
suggestion.

--



Re: premature end of data for lang/go package (mips64)

2022-12-12 Thread Stuart Henderson
On 2022-12-11, void  wrote:
> Hello misc@
>
> I get the following error when trying to install go (for mips64/octeon):
>
> # pkg_add go
> quirks-6.42 signed on 2022-10-08T21:12:07Z
> Ustar
> [http://cdn.openbsd.org/pub/OpenBSD/7.2/packages/mips64/go-1.19.1p0.tgz][go/pkg/openbsd_mips64/cmd/compile/internal/reflectdata.a]:
> Premature end of archive
> Adjusting sha for
> /usr/local/go/pkg/openbsd_mips64/cmd/compile/internal/reflectdata.a from
> /dvcLn8+FQ5qji2A6mxyIWODWY35KxCB9u4isEHanf0= to
> 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=
> pkg_add: Installation of go-1.19.1p0 failed, partial installation
> recorded as partial-go-1.19.1p0
>
> Changing /etc/installurl makes no difference. In addition to the above
> CDN, I have tried
> www.mirrorservice.org
> mirrors.gethosted.online
> mirror.laylo.io
>
> same result.
>
> How can I get around this problem? I'd like to avoid compiling on the
> device itself because it has limited resources for that type of thing.
> It is only this pkg with this problem. There are no connectivity issues.

This *shouldn't* break like this, but it's possible that if writing to
the filesystem is very slow you have a timeout fetching the file. (The go
package has a *lot* of small files and with the default mount options,
creating a lot of new files on slow storage can take a very long time).

It might help to mount the filesystem holding /usr/local with the softdep
flag.

Or you maybe able to workaround by downloading the package and installing
it from local atorage rather than over the network.




premature end of data for lang/go package (mips64)

2022-12-11 Thread void

Hello misc@

I get the following error when trying to install go (for mips64/octeon):

# pkg_add go
quirks-6.42 signed on 2022-10-08T21:12:07Z
Ustar
[http://cdn.openbsd.org/pub/OpenBSD/7.2/packages/mips64/go-1.19.1p0.tgz][go/pkg/openbsd_mips64/cmd/compile/internal/reflectdata.a]:
Premature end of archive
Adjusting sha for
/usr/local/go/pkg/openbsd_mips64/cmd/compile/internal/reflectdata.a from
/dvcLn8+FQ5qji2A6mxyIWODWY35KxCB9u4isEHanf0= to
47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=
pkg_add: Installation of go-1.19.1p0 failed, partial installation
recorded as partial-go-1.19.1p0

Changing /etc/installurl makes no difference. In addition to the above
CDN, I have tried
www.mirrorservice.org
mirrors.gethosted.online
mirror.laylo.io

same result.

How can I get around this problem? I'd like to avoid compiling on the
device itself because it has limited resources for that type of thing.
It is only this pkg with this problem. There are no connectivity issues.

Alternatively, is it feasible to build an amd64 vm and cross-compile
there, for mips64/octeon?

dmesg follows:

[ using 752776 bytes of bsd ELF symbol table ]
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California.  All rights
reserved.
Copyright (c) 1995-2022 OpenBSD. All rights reserved.
https://www.OpenBSD.org

OpenBSD 7.2 (GENERIC.MP) #1063: Tue Sep 27 19:23:10 MDT 2022
dera...@octeon.openbsd.org:/usr/src/sys/arch/octeon/compile/GENERIC.MP
real mem = 536870912 (512MB)
avail mem = 521322496 (497MB)
random: good seed from bootblocks
mainbus0 at root: board 20002 rev 2.18, model CN3xxx/CN5xxx
cpu0 at mainbus0: CN50xx CPU rev 0.1 500 MHz, Software FP
emulation
cpu0: cache L1-I 32KB 4 way D 16KB 64 way, L2 128KB 8 way
cpu1 at mainbus0: CN50xx CPU rev 0.1 500 MHz, Software FP
emulation
cpu1: cache L1-I 32KB 4 way D 16KB 64 way, L2 128KB 8 way
clock0 at mainbus0: int 5
octcrypto0 at mainbus0
iobus0 at mainbus0
simplebus0 at iobus0: "soc"
octciu0 at simplebus0
octsmi0 at simplebus0
octpip0 at simplebus0
octgmx0 at octpip0 interface 0
cnmac0 at octgmx0: port 0 RGMII, address f0:9f:c2:12:31:db
atphy0 at cnmac0 phy 7: AR8035 10/100/1000 PHY, rev. 2
cnmac1 at octgmx0: port 1 RGMII, address f0:9f:c2:12:31:dc
atphy1 at cnmac1 phy 6: AR8035 10/100/1000 PHY, rev. 2
cnmac2 at octgmx0: port 2 RGMII, address f0:9f:c2:12:31:dd
atphy2 at cnmac2 phy 5: AR8035 10/100/1000 PHY, rev. 2
com0 at simplebus0: ns16550a, 64 byte fifo
com0: console
dwctwo0 at iobus0 base 0x118006800 irq 56
usb0 at dwctwo0: USB revision 2.0
uhub0 at usb0 configuration 1 interface 0 "Octeon DWC2 root
hub" rev 2.00/1.00 addr 1
octrng0 at iobus0 base 0x14000 irq 0
umass0 at uhub0 port 1 configuration 1 interface 0 "SanDisk'
Cruzer Fit" rev 2.00/1.00 addr 2
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, initiator 0
sd0 at scsibus0 targ 1 lun 0: 
removable serial.07815571020705203013
sd0: 29340MB, 512 bytes/sector, 60088320 sectors
vscsi0 at root
scsibus1 at vscsi0: 256 targets
softraid0 at root
scsibus2 at softraid0: 256 targets
root on sd0a (a804a0144e807aaa.a) swap on sd0b dump on sd0b
WARNING: CHECK AND RESET THE DATE!

tia,
--