Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZAiNSUYt1gC4JWng@localhost.localdomain>
Date: Wed, 8 Mar 2023 13:27:37 +0000
From: "Max R. Dechantsreiter" <max@...formancejones.com>
To: Rich Felker <dalias@...c.org>
Cc: musl@...ts.openwall.com
Subject: Re: unknown type name '__gnuc_va_list'

On Wed, Mar 08, 2023 at 08:24:42AM -0500, Rich Felker wrote:
> On Wed, Mar 08, 2023 at 01:09:25PM +0000, Max R. Dechantsreiter wrote:
> > ....I got the "validation test" working by setting C_INCLUDE_PATH:
> > 
> > cat > hello.c <<EOF
> > #include <stdio.h>
> > int main()
> > {
> >   printf("Hello, world!\n");
> >   return 0;
> > }
> > EOF
> > echo $CPATH
> > # /home/maxd/GNU/opt/gnu/gcc-12.1.0/include:/usr/include
> > export C_INCLUDE_PATH=$CPATH
> > $INSTALL/bin/musl-gcc hello.c
> > ../a.out
> > # Hello, world!
> 
> I suspect you already had C_INCLUDE_PATH in your environment and gcc

Actually not - it was unset.

> was finding /usr/include via that despite the musl-gcc wrapper
> suppressing the default. You should unset C_INCLUDE_PATH, or if you
> really need to set it, ensure that any non-musl include paths (e.g.
> /usr/include) do not appear in C_INCLUDE_PATH or any -I, etc.
> 
> It's not clear to me whether the musl-gcc wrapper should try to do
> anything to suppress C_INCLUDE_PATH, since you might want it for
> adding intended paths when invoking the wrapper. Maybe it could be
> enhanced to remove known-bad pathss but that seems fragile.
> 
> > For what it's worth:
> > 
> > [/home/maxd] 56> cat /proc/version
> > Linux version 4.19.0 (mockbuild@...lder1.eng.sw.ru) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) ) #1 SMP Thu Dec 15 20:31:06 MSK 2022
> > [/home/maxd] 57>
> > 
> > However, my application built with this musl-gcc still ends with
> > 
> > Killed
> 
> This is probably just a bug in the application. You could run it under
> gdb to see. Are you using static or dynamic linking? I thought you
> wanted static but I don't see -static in your command line above.

I will check that, thanks.

> 
> Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.