Re: [Bug (?) ld]: ld interprets % weirdly

2023-06-11 Thread Andinus


Theo de Raadt @ 2023-06-11 00:01 -06:

> I assume you are on an architecture where the linker is LLVM ld,
> otherwise known as ld-lld in OpenBSD (some older architectures
> still use ld-bfd).

Yes, seems so.

uname -a:
OpenBSD cadmium.cadmium 7.3 GENERIC.MP#1125 amd64

ld --version:
LLD 13.0.0 (compatible with GNU linkers)

> [...]
> It apppears in the LLVM universe if you try to create a file with % in the
> name, it has a different interpretation of what that % means, different than
> what you want it to mean.
>
> https://docs.hdoc.io/hdoc/llvm-project/f1FB0DB2307A8013C.html
>
> Other than that, I can find no documentation.

I see, makes sense. So the solution would be to avoid '%' in path right?

> Andinus  wrote:
>
>> Hello,
>>
>> Context: https://github.com/ugexe/zef/issues/457#issuecomment-1586021352
>>
>> I'm not familiar with how `ld` works so I'm not sure how to create a
>> minimal reproducible example.
>>
>> - zef is Raku's module manager
>> - Raku: formerly Perl 6
>>
>> When I try to run `zef install --debug Crypt::Bcrypt` it always fails in
>> build step with this error:
>>
>> ```
>> ...
>> Jun 01 19:01:41 [Digest::SHA1::Native] clang -shared -fPIC  -O3 -DNDEBUG 
>> -Wl,-rpath,"//usr/local/rakudo/lib" -o 
>> /tmp/.zef/1685626244.6528/Digest%3A%3ASHA1%3A%3ANative%3Aver%3C0.06%3E%3Aauth%3Cgithub%3Abduggan%3E.tar.gz/raku-digest-sha1-native-master/resources/libraries/libsha1.so
>>  sha1.o
>> Jun 01 19:01:41 [Digest::SHA1::Native] ld: error: cannot open output file 
>> /tmp/.zef/1685626244.6528/Digest%3A%3ASHA1%3A%3ANative%3Aver%3C0.06%3E%3Aauth%3Cgithub%3Abduggan%3E.tar.gz/raku-digest-sha1-native-master/resources/libraries/libsha1.so:
>>  No such file or directory
>> Jun 01 19:01:41 [Digest::SHA1::Native] clang: error: linker command failed 
>> with exit code 1 (use -v to see invocation)
>> ...
>> ```
>>
>> This is how `ld` is invoked, the issue seems to be with '%' in directory
>> name:
>> ```
>> andinus@cadmium /t/.z/1/D/raku-digest-sha1-native-master> "/usr/bin/ld" 
>> --eh-frame-hdr -Bdynamic -shared -o 
>> /tmp/.zef/1686382217.68953/Digest%3A%3ASHA1%3A%3ANative%3Aver%3C0.06%3E%3Aauth%3Cgithub%3Abduggan%3E.tar.gz/raku-digest-sha1-native-master/resources/libraries/libsha1.so
>>  /usr/lib/crtbeginS.o -L/usr/lib -rpath //usr/local/rakudo/lib sha1.o 
>> -lcompiler_rt -lcompiler_rt /usr/lib/crtendS.o
>> ld: error: cannot open output file 
>> /tmp/.zef/1686382217.68953/Digest%3A%3ASHA1%3A%3ANative%3Aver%3C0.06%3E%3Aauth%3Cgithub%3Abduggan%3E.tar.gz/raku-digest-sha1-native-master/resources/libraries/libsha1.so:
>> No such file or directory
>> ```
>>
>> Quoting the path doesn't work, even escaping '%' with \ doesn't seem to
>> work. What works is removing % from path altogether.
>>
>> Here is ktrace output:
>> ```
>>  23633 ld   NAMI  
>> "/tmp/.zef/1686382217.68953/Digest%3A%3ASHA1%3A%3ANative%3Aver%3C0.06%3E%3Aauth%3Cgithub%3Abduggan%3E.tar.gz/raku-digest-sha1-native-master/resources/libraries/libsh\
>> a1.so"
>>  23633 ld   RET   stat -1 errno 2 No such file or directory
>>  23633 ld   CALL  kbind(0x7f0992e23f18,24,0xf17447ef4e72dc56)
>>  23633 ld   RET   kbind 0
>>  23633 ld   CALL  
>> open(0x29843bc00,0x10a02,0666)
>>  23633 ld   NAMI  
>> "/tmp/.zef/1686382217.68953/Digest73A43ASHA143A73ANativef3Aver73C0.0613E23Aauth73Cgithuba3Abduggan13E.tar.gz/raku-digest-sha1-native-master/resources/libraries/libsh\
>> a1.so.tmpc5eb445"
>>  23633 ld   RET   open -1 errno 2 No such file or directory
>>  23633 ld   CALL  kbind(0x7f0992e244e8,24,0xf17447ef4e72dc56)
>>  23633 ld   RET   kbind 0
>> .
>> .
>> .
>>  23633 ld   RET   kbind 0
>>  23633 ld   CALL  write(2,0x7f0992e24501,0x2)
>>  23633 ld   GIO   fd 2 wrote 2 bytes
>>"ld"
>>  23633 ld   RET   write 2
>>  23633 ld   CALL  write(2,0x3a9837,0x2)
>>  23633 ld   GIO   fd 2 wrote 2 bytes
>>": "
>>  23633 ld   RET   write 2
>>  23633 ld   CALL  write(2,0x336c72,0x7)
>>  23633 ld   GIO   fd 2 wrote 7 bytes
>>"error: "
>>  23633 ld   RET   write 7
>>  23633 ld   CALL  write(2,0x4a96e1,0x18)
>>  23633 ld   GIO   fd 2 wrote 24 bytes
>>"cannot open output file "
>>  23633 ld   RET   write 24/0x18
>>  23633 ld   CALL  write(2,0x7f0992e25008,0xa9)
>>  23633 l

[Bug (?) ld]: ld interprets % weirdly

2023-06-10 Thread Andinus
Hello,

Context: https://github.com/ugexe/zef/issues/457#issuecomment-1586021352

I'm not familiar with how `ld` works so I'm not sure how to create a
minimal reproducible example.

- zef is Raku's module manager
- Raku: formerly Perl 6

When I try to run `zef install --debug Crypt::Bcrypt` it always fails in
build step with this error:

```
...
Jun 01 19:01:41 [Digest::SHA1::Native] clang -shared -fPIC  -O3 -DNDEBUG 
-Wl,-rpath,"//usr/local/rakudo/lib" -o 
/tmp/.zef/1685626244.6528/Digest%3A%3ASHA1%3A%3ANative%3Aver%3C0.06%3E%3Aauth%3Cgithub%3Abduggan%3E.tar.gz/raku-digest-sha1-native-master/resources/libraries/libsha1.so
 sha1.o
Jun 01 19:01:41 [Digest::SHA1::Native] ld: error: cannot open output file 
/tmp/.zef/1685626244.6528/Digest%3A%3ASHA1%3A%3ANative%3Aver%3C0.06%3E%3Aauth%3Cgithub%3Abduggan%3E.tar.gz/raku-digest-sha1-native-master/resources/libraries/libsha1.so:
 No such file or directory
Jun 01 19:01:41 [Digest::SHA1::Native] clang: error: linker command failed with 
exit code 1 (use -v to see invocation)
...
```

This is how `ld` is invoked, the issue seems to be with '%' in directory
name:
```
andinus@cadmium /t/.z/1/D/raku-digest-sha1-native-master> "/usr/bin/ld" 
--eh-frame-hdr -Bdynamic -shared -o 
/tmp/.zef/1686382217.68953/Digest%3A%3ASHA1%3A%3ANative%3Aver%3C0.06%3E%3Aauth%3Cgithub%3Abduggan%3E.tar.gz/raku-digest-sha1-native-master/resources/libraries/libsha1.so
 /usr/lib/crtbeginS.o -L/usr/lib -rpath //usr/local/rakudo/lib sha1.o 
-lcompiler_rt -lcompiler_rt /usr/lib/crtendS.o
ld: error: cannot open output file 
/tmp/.zef/1686382217.68953/Digest%3A%3ASHA1%3A%3ANative%3Aver%3C0.06%3E%3Aauth%3Cgithub%3Abduggan%3E.tar.gz/raku-digest-sha1-native-master/resources/libraries/libsha1.so:
No such file or directory
```

Quoting the path doesn't work, even escaping '%' with \ doesn't seem to
work. What works is removing % from path altogether.

Here is ktrace output:
```
 23633 ld   NAMI  
"/tmp/.zef/1686382217.68953/Digest%3A%3ASHA1%3A%3ANative%3Aver%3C0.06%3E%3Aauth%3Cgithub%3Abduggan%3E.tar.gz/raku-digest-sha1-native-master/resources/libraries/libsh\
a1.so"
 23633 ld   RET   stat -1 errno 2 No such file or directory
 23633 ld   CALL  kbind(0x7f0992e23f18,24,0xf17447ef4e72dc56)
 23633 ld   RET   kbind 0
 23633 ld   CALL  
open(0x29843bc00,0x10a02,0666)
 23633 ld   NAMI  
"/tmp/.zef/1686382217.68953/Digest73A43ASHA143A73ANativef3Aver73C0.0613E23Aauth73Cgithuba3Abduggan13E.tar.gz/raku-digest-sha1-native-master/resources/libraries/libsh\
a1.so.tmpc5eb445"
 23633 ld   RET   open -1 errno 2 No such file or directory
 23633 ld   CALL  kbind(0x7f0992e244e8,24,0xf17447ef4e72dc56)
 23633 ld   RET   kbind 0
.
.
.
 23633 ld   RET   kbind 0
 23633 ld   CALL  write(2,0x7f0992e24501,0x2)
 23633 ld   GIO   fd 2 wrote 2 bytes
   "ld"
 23633 ld   RET   write 2
 23633 ld   CALL  write(2,0x3a9837,0x2)
 23633 ld   GIO   fd 2 wrote 2 bytes
   ": "
 23633 ld   RET   write 2
 23633 ld   CALL  write(2,0x336c72,0x7)
 23633 ld   GIO   fd 2 wrote 7 bytes
   "error: "
 23633 ld   RET   write 7
 23633 ld   CALL  write(2,0x4a96e1,0x18)
 23633 ld   GIO   fd 2 wrote 24 bytes
   "cannot open output file "
 23633 ld   RET   write 24/0x18
 23633 ld   CALL  write(2,0x7f0992e25008,0xa9)
 23633 ld   GIO   fd 2 wrote 169 bytes
   
"/tmp/.zef/1686382217.68953/Digest%3A%3ASHA1%3A%3ANative%3Aver%3C0.06%3E%3Aauth%3Cgithub%3Abduggan%3E.tar.gz/raku-digest-sha1-native-master/resources/libraries/libsha1.so"
 23633 ld   RET   write 169/0xa9
 23633 ld   CALL  write(2,0x3a9837,0x2)
 23633 ld   GIO   fd 2 wrote 2 bytes
   ": "
 23633 ld   RET   write 2
 23633 ld   CALL  write(2,0x298433740,0x19)
 23633 ld   GIO   fd 2 wrote 25 bytes
   "No such file or directory"
 23633 ld   RET   write 25/0x19
 23633 ld   CALL  write(2,0x40431f,0x1)
 23633 ld   GIO   fd 2 wrote 1 bytes
   "
   "
.
.
.
```

If you notice the 2nd `NAMI`:
```
 23633 ld   NAMI  
"/tmp/.zef/1686382217.68953/Digest%3A%3ASHA1%3A%3ANative%3Aver%3C0.06%3E%3Aauth%3Cgithub%3Abduggan%3E.tar.gz/raku-digest-sha1-native-master/resources/libraries/libsh\
a1.so"
...
 23633 ld   NAMI  
"/tmp/.zef/1686382217.68953/Digest73A43ASHA143A73ANativef3Aver73C0.0613E23Aauth73Cgithuba3Abduggan13E.tar.gz/raku-digest-sha1-native-master/resources/libraries/libsh\
a1.so.tmpc5eb445"
```

ld seems to interpret those '%' weirdly, it turns them into some
alphanumeric character.

I suspect this might be what is causing this issue.


Re: Shell account service providers

2020-07-21 Thread Andinus

Adrian Grigore @ 2020-07-19 13:33 IST:

> https://tilde.institute/

There's also tilde.black, both are part of [tildeverse]. But it doesn't
meet the poster's requirements.

>> > Minimally, SSH login, 100GB disk space, and build tools

I think the admins would be okay with installing build tools if it's in
ports but I doubt you'll get 100GB disk space, no tilde server will
allow that.

[tildeverse] https://tildeverse.org


signature.asc
Description: PGP signature


Re: What does the "#n" after "GENERIC.MP" stand for?

2020-06-28 Thread Andinus

Ottavio Caruso @ 2020-06-28 18:26 IST:

> ~$ uname -v
> GENERIC.MP#0
> ~$ sysctl kern.osversion
> kern.osversion=GENERIC.MP#0

Might be version number? I mean you are looking at `kern.osversion' &
there's only `#0' that can represent version.

> This was GENERIC.MP#7 before I ran syspatch and rebooted.
>
> I can't find a reference to this notation. I thought it could have
> been the patch version number, but it's obviously not so. Looking on:
> https://dmesgd.nycbug.org/index.cgi?do=index&fts=OpenBSD
>
> it appears machines running -current have a higher #number.


signature.asc
Description: PGP signature


Re: acpivout error using vega20 hardware

2020-05-23 Thread Andinus


You sent an email 11MiB in size!! Upload it elsewhere, please don't
attach huge images to email.



Re: BIOS/MBR vs UEFI/GPT install

2020-05-17 Thread Andinus

Mihai Popescu @ 2020-05-16 20:24 IST:

> I tried UEFI/GPT but things went wrong and I was not able to boot OpenBSD's
> kernel after install.

Check if you are actually booting into UEFI mode, both during & after
installation.

> Is there any penalty using BIOS/MBR versus UEFI/GPT?
> Are there any extra steps to be taken if one uses UEFI/GPT other than dd
> minirootXX.iso to an USB disk?

Maybe try formatting the installation drive during installation.


signature.asc
Description: PGP signature


Re: pkg_add -u: no such dir

2020-05-05 Thread Andinus

Jan Betlach @ 2020-05-05 17:05 IST:

> Is 6.7 being released already?

No, they're probably using a snapshot.


signature.asc
Description: PGP signature


Re: When OpenBSD 6.7 is going to be released?

2020-05-04 Thread Andinus
According to this [0], it's scheduled for May 19.

[0]: 
https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/etc/root/root.mail.diff?r1=1.137&r2=1.138