[Bug 222924] vfork.S doesn't compile with -g --coverage

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 222924] vfork.S doesn't compile with -g --coverage

bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222924

            Bug ID: 222924
           Summary: vfork.S doesn't compile with -g --coverage
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: arm
          Assignee: [hidden email]
          Reporter: [hidden email]

Spotted when running make tinderbox on universe12a.freebsd.org:

===> lib/libc (obj,all,install)
/scratch/tmp/ngie/obj/arm64.aarch64/scratch/tmp/ngie/svn/tmp/usr/bin/ld: error:
/scratch/tmp/ngie/svn/lib/libc/aarch64/sys/vfork.S:37: relocation
R_AARCH64_CONDBR19 out of range
cc: error: linker command failed with exit code 1 (use -v to see invocation)
--- libc.so.7.full ---
*** [libc.so.7.full] Error code 1

make[6]: stopped in /scratch/tmp/ngie/svn/lib/libc
1 error

make[6]: stopped in /scratch/tmp/ngie/svn/lib/libc

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

NanoBSD: Cuurent/NANO_ARCH=aarch64: chroot: : No such file or directory

O. Hartmann-5
Trying to install a successfully cross compiled FreeBSD (TARGET=arm64) as NanoBSD.
NanoBSD is configure using NANO_ARCH="aarch64".

Port emulators/qemu-user-static is installed and loaded:

 8    1 0xffffffff8243f000 1564     imgact_binmisc.ko

When installing NanoBSD's world and then running mtree, the nanobsd script runs into this
error:

/pool/nanobsd/aarch64/NANO_aarch64/_.w/./boot/loader.conf.local
283 blocks
+ [ -n /home/user/Projects/router/nanobsd/mtree/Files.mtree -a \
                        -f /home/user/Projects/router/nanobsd/mtree/Files.mtree ]
+ CR 'mtree -eiU -p /'
+ chroot /pool/nanobsd/aarch64/NANO_aarch64/_.w '' /bin/sh -exc 'mtree -eiU -p /'
chroot: : No such file or directory

Is there anything I miss here with the QEMU emulator catching up?

Thanks in advance,

Oliver

--
O. Hartmann

Ich widerspreche der Nutzung oder Übermittlung meiner Daten für
Werbezwecke oder für die Markt- oder Meinungsforschung (§ 28 Abs. 4 BDSG).

attachment0 (321 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: NanoBSD: Cuurent/NANO_ARCH=aarch64: chroot: : No such file or directory

Ian Lepore-3
On Wed, 2017-10-11 at 20:47 +0200, O. Hartmann wrote:

> Trying to install a successfully cross compiled FreeBSD (TARGET=arm64) as NanoBSD.
> NanoBSD is configure using NANO_ARCH="aarch64".
>
> Port emulators/qemu-user-static is installed and loaded:
>
>  8    1 0xffffffff8243f000 1564     imgact_binmisc.ko
>
> When installing NanoBSD's world and then running mtree, the nanobsd script runs into this
> error:
>
> /pool/nanobsd/aarch64/NANO_aarch64/_.w/./boot/loader.conf.local
> 283 blocks
> + [ -n /home/user/Projects/router/nanobsd/mtree/Files.mtree -a \
> -f /home/user/Projects/router/nanobsd/mtree/Files.mtree ]
> + CR 'mtree -eiU -p /'
> + chroot /pool/nanobsd/aarch64/NANO_aarch64/_.w '' /bin/sh -exc 'mtree -eiU -p /'
> chroot: : No such file or directory
>

I'm not sure how or why it's happening (I've never used nanobsd), but
the complaint is about those empty quotes ('') between the pathname and
the /bin/sh in the chroot command.  It's trying to run a program named
'' and chroot is complaining that it can't find anything named that.

-- Ian

> Is there anything I miss here with the QEMU emulator catching up?
>
> Thanks in advance,
>
> Oliver
>
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: NanoBSD: Current/NANO_ARCH=aarch64: chroot: : No such file or directory

O. Hartmann-5
On Wed, 11 Oct 2017 16:53:46 -0600
Ian Lepore <[hidden email]> wrote:

> On Wed, 2017-10-11 at 20:47 +0200, O. Hartmann wrote:
> > Trying to install a successfully cross compiled FreeBSD
> > (TARGET=arm64) as NanoBSD. NanoBSD is configure using
> > NANO_ARCH="aarch64".
> >
> > Port emulators/qemu-user-static is installed and loaded:
> >
> >  8    1 0xffffffff8243f000 1564     imgact_binmisc.ko
> >
> > When installing NanoBSD's world and then running mtree, the nanobsd
> > script runs into this error:
> >
> > /pool/nanobsd/aarch64/NANO_aarch64/_.w/./boot/loader.conf.local
> > 283 blocks
> > + [ -n /home/user/Projects/router/nanobsd/mtree/Files.mtree -a \
> > -f /home/user/Projects/router/nanobsd/mtree/Files.mtree
> > ]
> > + CR 'mtree -eiU -p /'
> > + chroot /pool/nanobsd/aarch64/NANO_aarch64/_.w '' /bin/sh -exc
> > 'mtree -eiU -p /' chroot: : No such file or directory

Oops, I confused the output.

The correct one is:

[ from _.cust.cust_install_files ]

...
+ chroot /pool/nanobsd/aarch64/NANO_aarch64/_.w /bin/sh -exc 'mtree
  -eiU -p /' chroot: /bin/sh: No such file or directory

The empty '' is due to my (hopeless helpless) attempt to fit-in another
variable which was set to an empty string.

The error looks to me as chroot does't find the proper shell, /bin/sh,
but it has been properly installed:

# file _.w/bin/sh
_.w/bin/sh: ELF 64-bit LSB executable, ARM aarch64, version 1
(FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for
FreeBSD 12.0 (1200051), FreeBSD-style, stripped

# ll _.w/bin/sh
839832 -r-xr-xr-x  1 root  wheel  uarch  261K 12 Okt. 15:32 _.w/bin/sh

NanoBSD works on the native host when building on host arch amd64 for
host arch amd64 and I guess it is due to the properly installed OS of
the host.

I do not get the problem here. qemu_user_static should catch up with
the alien binary here - I suppose it does. The absolute path should
ensure the use of the right binary ...

Regards,

Oliver

> >  
>
> I'm not sure how or why it's happening (I've never used nanobsd), but
> the complaint is about those empty quotes ('') between the pathname
> and the /bin/sh in the chroot command.  It's trying to run a program
> named '' and chroot is complaining that it can't find anything named
> that.
>
> -- Ian
>
> > Is there anything I miss here with the QEMU emulator catching up?
> >
> > Thanks in advance,
> >
> > Oliver
> >  

_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: NanoBSD: Current/NANO_ARCH=aarch64: chroot: : No such file or directory

O. Hartmann-5
Am Thu, 12 Oct 2017 15:39:26 +0200
"Hartmann, O." <[hidden email]> schrieb:



> On Wed, 11 Oct 2017 16:53:46 -0600
> Ian Lepore <[hidden email]> wrote:
>
> > On Wed, 2017-10-11 at 20:47 +0200, O. Hartmann wrote:  
> > > Trying to install a successfully cross compiled FreeBSD
> > > (TARGET=arm64) as NanoBSD. NanoBSD is configure using
> > > NANO_ARCH="aarch64".
> > >
> > > Port emulators/qemu-user-static is installed and loaded:
> > >
> > >  8    1 0xffffffff8243f000 1564     imgact_binmisc.ko
> > >
> > > When installing NanoBSD's world and then running mtree, the nanobsd
> > > script runs into this error:
> > >
> > > /pool/nanobsd/aarch64/NANO_aarch64/_.w/./boot/loader.conf.local
> > > 283 blocks
> > > + [ -n /home/user/Projects/router/nanobsd/mtree/Files.mtree -a \
> > > -f /home/user/Projects/router/nanobsd/mtree/Files.mtree
> > > ]
> > > + CR 'mtree -eiU -p /'
> > > + chroot /pool/nanobsd/aarch64/NANO_aarch64/_.w '' /bin/sh -exc
> > > 'mtree -eiU -p /' chroot: : No such file or directory  
>
> Oops, I confused the output.
>
> The correct one is:
>
> [ from _.cust.cust_install_files ]
>
> ...
> + chroot /pool/nanobsd/aarch64/NANO_aarch64/_.w /bin/sh -exc 'mtree
>   -eiU -p /' chroot: /bin/sh: No such file or directory
>
> The empty '' is due to my (hopeless helpless) attempt to fit-in another
> variable which was set to an empty string.
>
> The error looks to me as chroot does't find the proper shell, /bin/sh,
> but it has been properly installed:
>
> # file _.w/bin/sh
> _.w/bin/sh: ELF 64-bit LSB executable, ARM aarch64, version 1
> (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for
> FreeBSD 12.0 (1200051), FreeBSD-style, stripped
>
> # ll _.w/bin/sh
> 839832 -r-xr-xr-x  1 root  wheel  uarch  261K 12 Okt. 15:32 _.w/bin/sh
>
> NanoBSD works on the native host when building on host arch amd64 for
> host arch amd64 and I guess it is due to the properly installed OS of
> the host.
>
> I do not get the problem here. qemu_user_static should catch up with
> the alien binary here - I suppose it does. The absolute path should
> ensure the use of the right binary ...
>
> Regards,
>
> Oliver
>
> > >    
> >
> > I'm not sure how or why it's happening (I've never used nanobsd), but
> > the complaint is about those empty quotes ('') between the pathname
> > and the /bin/sh in the chroot command.  It's trying to run a program
> > named '' and chroot is complaining that it can't find anything named
> > that.
> >
> > -- Ian
> >  
> > > Is there anything I miss here with the QEMU emulator catching up?
> > >
> > > Thanks in advance,
> > >
> > > Oliver
> > >    
>
I didn't find a solution to this problem, it might be that someone has already have such
a problem solved, so I'm sending CC'ed also to the list "questions".

The background is above described.

Running most recent qemu-user-static (qemu-user-static-2.9.94.g20171011), loaded and
running a kernel module, chrooting into a cross-compiled aarch64 installation of recent
12-CURRENT (r324621) fails with error (from NanoBSD):

[...]
chroot /pool/nanobsd/aarch64/NANO_aarch64/_.w /bin/sh -exc 'mtree -eiU -p /'
chroot: /bin/sh: No such file or directory

There is no further output so I fly blind. As mentioned above, /bin/sh is installed and
present in the chrooted target folder and  file states, that it has been compiled for
aarch64.

I tried manually the very same command - amongst other attempts to chroot and execute a
command - but always the same: I get the error shown above, no such file or directory.

Do I miss something here? Do I have to install some crosse development tools/libs into
the chrooted target first, so /bin/sh can be emulated correctly?

I'm quite new to cross compiling. But at this point with this thin, fainting amount of
information why it fails, I can't even start searching ...

Hopefully someone can shed some light on this.

Thanks in advance,

oh
--
O. Hartmann

Ich widerspreche der Nutzung oder Übermittlung meiner Daten für
Werbezwecke oder für die Markt- oder Meinungsforschung (§ 28 Abs. 4 BDSG).

attachment0 (321 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: NanoBSD: Current/NANO_ARCH=aarch64: chroot: : No such file or directory

Per Hedeland
On 2017-10-15 21:09, O. Hartmann wrote:

> Am Thu, 12 Oct 2017 15:39:26 +0200
> "Hartmann, O." <[hidden email]> schrieb:
>
>
>
>> On Wed, 11 Oct 2017 16:53:46 -0600
>> Ian Lepore <[hidden email]> wrote:
>>
>>> On Wed, 2017-10-11 at 20:47 +0200, O. Hartmann wrote:
>>>> Trying to install a successfully cross compiled FreeBSD
>>>> (TARGET=arm64) as NanoBSD. NanoBSD is configure using
>>>> NANO_ARCH="aarch64".
>>>>
>>>> Port emulators/qemu-user-static is installed and loaded:
>>>>
>>>>   8    1 0xffffffff8243f000 1564     imgact_binmisc.ko
>>>>
>>>> When installing NanoBSD's world and then running mtree, the nanobsd
>>>> script runs into this error:
>>>>
>>>> /pool/nanobsd/aarch64/NANO_aarch64/_.w/./boot/loader.conf.local
>>>> 283 blocks
>>>> + [ -n /home/user/Projects/router/nanobsd/mtree/Files.mtree -a \
>>>> -f /home/user/Projects/router/nanobsd/mtree/Files.mtree
>>>> ]
>>>> + CR 'mtree -eiU -p /'
>>>> + chroot /pool/nanobsd/aarch64/NANO_aarch64/_.w '' /bin/sh -exc
>>>> 'mtree -eiU -p /' chroot: : No such file or directory
>>
>> Oops, I confused the output.
>>
>> The correct one is:
>>
>> [ from _.cust.cust_install_files ]
>>
>> ...
>> + chroot /pool/nanobsd/aarch64/NANO_aarch64/_.w /bin/sh -exc 'mtree
>>    -eiU -p /' chroot: /bin/sh: No such file or directory
>>
>> The empty '' is due to my (hopeless helpless) attempt to fit-in another
>> variable which was set to an empty string.
>>
>> The error looks to me as chroot does't find the proper shell, /bin/sh,
>> but it has been properly installed:
>>
>> # file _.w/bin/sh
>> _.w/bin/sh: ELF 64-bit LSB executable, ARM aarch64, version 1
>> (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for
>> FreeBSD 12.0 (1200051), FreeBSD-style, stripped
>>
>> # ll _.w/bin/sh
>> 839832 -r-xr-xr-x  1 root  wheel  uarch  261K 12 Okt. 15:32 _.w/bin/sh
>>
>> NanoBSD works on the native host when building on host arch amd64 for
>> host arch amd64 and I guess it is due to the properly installed OS of
>> the host.
>>
>> I do not get the problem here. qemu_user_static should catch up with
>> the alien binary here - I suppose it does. The absolute path should
>> ensure the use of the right binary ...
>>
>> Regards,
>>
>> Oliver
>>
>>>>      
>>>
>>> I'm not sure how or why it's happening (I've never used nanobsd), but
>>> the complaint is about those empty quotes ('') between the pathname
>>> and the /bin/sh in the chroot command.  It's trying to run a program
>>> named '' and chroot is complaining that it can't find anything named
>>> that.
>>>
>>> -- Ian
>>>    
>>>> Is there anything I miss here with the QEMU emulator catching up?
>>>>
>>>> Thanks in advance,
>>>>
>>>> Oliver
>>>>      
>>
>
> I didn't find a solution to this problem, it might be that someone has already have such
> a problem solved, so I'm sending CC'ed also to the list "questions".
>
> The background is above described.
>
> Running most recent qemu-user-static (qemu-user-static-2.9.94.g20171011), loaded and
> running a kernel module, chrooting into a cross-compiled aarch64 installation of recent
> 12-CURRENT (r324621) fails with error (from NanoBSD):
>
> [...]
> chroot /pool/nanobsd/aarch64/NANO_aarch64/_.w /bin/sh -exc 'mtree -eiU -p /'
> chroot: /bin/sh: No such file or directory

I have no idea if this is your problem, nor actually what you're trying
to do - I just want to point out that you can get this ENOENT error for
an executable not only when the executable doesn't exist, but also when
the loader a.k.a. "interpreter" that the executable wants doesn't exist.
I.e. check whether you have /libexec/ld-elf.so.1 in the chroot tree.

--Per Hedeland

> There is no further output so I fly blind. As mentioned above, /bin/sh is installed and
> present in the chrooted target folder and  file states, that it has been compiled for
> aarch64.
>
> I tried manually the very same command - amongst other attempts to chroot and execute a
> command - but always the same: I get the error shown above, no such file or directory.
>
> Do I miss something here? Do I have to install some crosse development tools/libs into
> the chrooted target first, so /bin/sh can be emulated correctly?
>
> I'm quite new to cross compiling. But at this point with this thin, fainting amount of
> information why it fails, I can't even start searching ...
>
> Hopefully someone can shed some light on this.
>
> Thanks in advance,
>
> oh
>

_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "[hidden email]"