Re: perl/experimental FTBFS on m68k, sh4

John Paul Adrian Glaubitz <[email protected]>
Newsgroups gmane.linux.debian.ports.superh,gmane.linux.debian.ports.68k
Message-ID <[email protected]>
Hi Niko!

On 7/8/19 6:01 PM, Niko Tyni wrote:
> The qemu-user specific thing is that $0 (= /proc/pid/cmdline) contains
> an absolute path to the binary there regardless of how it was actually
> invoked.
> 
> On normal systems:
> 
>   % sh -c 'echo $0'
>   sh
> 
> On qemu-user:
> 
>   $ sh -c 'echo $0'
>   /usr/bin/sh
> 
> It looks like the cflags.SH gets called in a different way in a
> subdirectory build, from Configure:2013 or so. In a subdirectory build
> it gets run with 'sh < cflags.SH' while in a "normal" build it gets run
> as 'sh cflags.SH'. The former causes $0 to contain '/usr/bin/sh' under
> qemu-user, and this then gets treated as an absolute path argument. So
> the code changes to the same path (here /usr/bin) and tries to create
> files there.
> 
> Looking at https://patchwork.kernel.org/patch/9633901/ I suspect
> the $0 handling in qemu-user is not easily fixed. I suppose the the
> Perl build machinery should handle this case just like it handles
> other quirks in weird systems and environments.
> 
> I'll file a bug separately.
Fantastic. Thanks so much for narrowing this down. Much appreciated.

This particular issue drove me nuts and I couldn't figure out what
the problem is. Glad you found out what the problem was.

PS: Can you CC me for the bug report you are filing?

Adrian
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.