* [musl] unknown type name '__gnuc_va_list'
@ 2023-03-07 13:48 Max R. Dechantsreiter
2023-03-07 19:37 ` Szabolcs Nagy
2023-03-07 20:28 ` Ralo Kossovo
0 siblings, 2 replies; 15+ messages in thread
From: Max R. Dechantsreiter @ 2023-03-07 13:48 UTC (permalink / raw)
To: musl
My musl-1.2.3 fails to compile the simple test:
cat > hello.c <<EOF
#include <stdio.h>
int main()
{
printf("Hello, world!\n");
return 0;
}
EOF
$INSTALL/bin/musl-gcc hello.c
/usr/include/stdio.h:52:9: error: unknown type name '__gnuc_va_list'
52 | typedef __gnuc_va_list va_list;
| ^~~~~~~~~~~~~~
/usr/include/stdio.h:52:24: error: conflicting types for 'va_list'; have 'int'
52 | typedef __gnuc_va_list va_list;
| ^~~~~~~
.
.
.
I configured musl as follows:
CC=gcc ./configure \
--prefix=$INSTALL \
--target=x86_64 \
--disable-shared \
>& configure.log
# CROSS_COMPILE configured to "x86_64-":
sed -i 's/\(CROSS_COMPILE = \).*/\1/' config.mak
and built (cleanly) with GCC 12.1.0 on
Linux version 4.19.0 (mockbuild@builder1.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
I had the same problem with GCC 10.2.1.
Is there a known fix/workaround someone could provide?
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [musl] unknown type name '__gnuc_va_list'
2023-03-07 13:48 [musl] unknown type name '__gnuc_va_list' Max R. Dechantsreiter
@ 2023-03-07 19:37 ` Szabolcs Nagy
2023-03-07 20:28 ` Ralo Kossovo
1 sibling, 0 replies; 15+ messages in thread
From: Szabolcs Nagy @ 2023-03-07 19:37 UTC (permalink / raw)
To: Max R. Dechantsreiter; +Cc: musl
* Max R. Dechantsreiter <max@performancejones.com> [2023-03-07 13:48:03 +0000]:
> My musl-1.2.3 fails to compile the simple test:
>
> cat > hello.c <<EOF
> #include <stdio.h>
> int main()
> {
> printf("Hello, world!\n");
> return 0;
> }
> EOF
> $INSTALL/bin/musl-gcc hello.c
> /usr/include/stdio.h:52:9: error: unknown type name '__gnuc_va_list'
> 52 | typedef __gnuc_va_list va_list;
> | ^~~~~~~~~~~~~~
this is not a musl header.
your musl-gcc is broken.
you should look at config.mak and the installed musl-gcc.specs to see why.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [musl] unknown type name '__gnuc_va_list'
2023-03-07 13:48 [musl] unknown type name '__gnuc_va_list' Max R. Dechantsreiter
2023-03-07 19:37 ` Szabolcs Nagy
@ 2023-03-07 20:28 ` Ralo Kossovo
2023-03-08 11:21 ` Max R. Dechantsreiter
1 sibling, 1 reply; 15+ messages in thread
From: Ralo Kossovo @ 2023-03-07 20:28 UTC (permalink / raw)
To: musl
Haven't you, by any chance, changed the values of the 'includedir' or
'srcdir' in musl's 'Makefile' or 'config.mak'.
What output does running 'grep -rni /usr/include' in musl's root
directory generate?
On 3/7/23, Max R. Dechantsreiter <max@performancejones.com> wrote:
> My musl-1.2.3 fails to compile the simple test:
>
> cat > hello.c <<EOF
> #include <stdio.h>
> int main()
> {
> printf("Hello, world!\n");
> return 0;
> }
> EOF
> $INSTALL/bin/musl-gcc hello.c
> /usr/include/stdio.h:52:9: error: unknown type name '__gnuc_va_list'
> 52 | typedef __gnuc_va_list va_list;
> | ^~~~~~~~~~~~~~
> /usr/include/stdio.h:52:24: error: conflicting types for 'va_list'; have
> 'int'
> 52 | typedef __gnuc_va_list va_list;
> | ^~~~~~~
> .
> .
> .
>
> I configured musl as follows:
>
> CC=gcc ./configure \
> --prefix=$INSTALL \
> --target=x86_64 \
> --disable-shared \
>>& configure.log
> # CROSS_COMPILE configured to "x86_64-":
> sed -i 's/\(CROSS_COMPILE = \).*/\1/' config.mak
>
> and built (cleanly) with GCC 12.1.0 on
>
> Linux version 4.19.0 (mockbuild@builder1.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
>
> I had the same problem with GCC 10.2.1.
>
> Is there a known fix/workaround someone could provide?
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [musl] unknown type name '__gnuc_va_list'
2023-03-07 20:28 ` Ralo Kossovo
@ 2023-03-08 11:21 ` Max R. Dechantsreiter
2023-03-08 11:27 ` Max R. Dechantsreiter
0 siblings, 1 reply; 15+ messages in thread
From: Max R. Dechantsreiter @ 2023-03-08 11:21 UTC (permalink / raw)
To: musl
On Tue, Mar 07, 2023 at 08:28:51PM +0000, Ralo Kossovo wrote:
> Haven't you, by any chance, changed the values of the 'includedir' or
> 'srcdir' in musl's 'Makefile' or 'config.mak'.
No changes; in Makefile:
srcdir = .
exec_prefix = /usr/local
bindir = $(exec_prefix)/bin
prefix = /usr/local/musl
includedir = $(prefix)/include
libdir = $(prefix)/lib
syslibdir = /lib
(excerpted), and the whole config.mak is as follows:
# This version of config.mak was generated by:
# ./configure --prefix=/home/maxd/GNU/lib/musl-1.2.3_gcc-12.1.0 --target=x86_64 --disable-shared
# Any changes made here will be lost if configure is re-run
AR = /home/maxd/GNU/opt/gnu/gcc-12.1.0/bin/gcc-ar
RANLIB = /home/maxd/GNU/opt/gnu/gcc-12.1.0/bin/gcc-ranlib
ARCH = x86_64
SUBARCH =
ASMSUBARCH =
srcdir = .
prefix = /home/maxd/GNU/lib/musl-1.2.3_gcc-12.1.0
exec_prefix = $(prefix)
bindir = $(exec_prefix)/bin
libdir = $(prefix)/lib
includedir = $(prefix)/include
syslibdir = /lib
CC = gcc
CFLAGS =
CFLAGS_AUTO = -Os -pipe -fomit-frame-pointer -fno-unwind-tables -fno-asynchronous-unwind-tables -ffunction-sections -fdata-sections -Wno-pointer-to-int-cast -Werror=implicit-function-declaration -Werror=implicit-int -Werror=pointer-sign -Werror=pointer-arith -Werror=int-conversion -Werror=incompatible-pointer-types -Werror=discarded-qualifiers -Werror=discarded-array-qualifiers -Waddress -Warray-bounds -Wchar-subscripts -Wduplicate-decl-specifier -Winit-self -Wreturn-type -Wsequence-point -Wstrict-aliasing -Wunused-function -Wunused-label -Wunused-variable
CFLAGS_C99FSE = -std=c99 -nostdinc -ffreestanding -fexcess-precision=standard -frounding-math -Wa,--noexecstack
CFLAGS_MEMOPS = -fno-tree-loop-distribute-patterns
CFLAGS_NOSSP = -fno-stack-protector
CPPFLAGS =
LDFLAGS =
LDFLAGS_AUTO = -Wl,--sort-section,alignment -Wl,--sort-common -Wl,--gc-sections -Wl,--hash-style=both -Wl,--no-undefined -Wl,--exclude-libs=ALL -Wl,--dynamic-list=./dynamic.list
CROSS_COMPILE =
LIBCC = -lgcc -lgcc_eh
OPTIMIZE_GLOBS = internal/*.c malloc/*.c string/*.c
ALL_TOOLS = obj/musl-gcc
TOOL_LIBS = lib/musl-gcc.specs
ADD_CFI = no
MALLOC_DIR = mallocng
SHARED_LIBS =
WRAPCC_GCC = $(CC)
> What output does running 'grep -rni /usr/include' in musl's root
> directory generate?
No output:
[/home/maxd/GNU/Build/musl-1.2.3_gcc-12.1.0] 29> grep -rni /usr/include
[/home/maxd/GNU/Build/musl-1.2.3_gcc-12.1.0] 30>
>
> On 3/7/23, Max R. Dechantsreiter <max@performancejones.com> wrote:
> > My musl-1.2.3 fails to compile the simple test:
> >
> > cat > hello.c <<EOF
> > #include <stdio.h>
> > int main()
> > {
> > printf("Hello, world!\n");
> > return 0;
> > }
> > EOF
> > $INSTALL/bin/musl-gcc hello.c
> > /usr/include/stdio.h:52:9: error: unknown type name '__gnuc_va_list'
> > 52 | typedef __gnuc_va_list va_list;
> > | ^~~~~~~~~~~~~~
> > /usr/include/stdio.h:52:24: error: conflicting types for 'va_list'; have
> > 'int'
> > 52 | typedef __gnuc_va_list va_list;
> > | ^~~~~~~
> > .
> > .
> > .
> >
> > I configured musl as follows:
> >
> > CC=gcc ./configure \
> > --prefix=$INSTALL \
> > --target=x86_64 \
> > --disable-shared \
> >>& configure.log
> > # CROSS_COMPILE configured to "x86_64-":
> > sed -i 's/\(CROSS_COMPILE = \).*/\1/' config.mak
> >
> > and built (cleanly) with GCC 12.1.0 on
> >
> > Linux version 4.19.0 (mockbuild@builder1.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
> >
> > I had the same problem with GCC 10.2.1.
> >
> > Is there a known fix/workaround someone could provide?
> >
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [musl] unknown type name '__gnuc_va_list'
2023-03-08 11:21 ` Max R. Dechantsreiter
@ 2023-03-08 11:27 ` Max R. Dechantsreiter
2023-03-08 12:43 ` Ralo Kossovo
0 siblings, 1 reply; 15+ messages in thread
From: Max R. Dechantsreiter @ 2023-03-08 11:27 UTC (permalink / raw)
To: musl
...I configured with
--prefix=/home/maxd/GNU/lib/musl-1.2.3_gcc-12.1.0
so how is it that prefix=/usr/local/musl?
Likewise exec_prefix should not be in system space.
According to 'configure -h':
Installation directories:
--prefix=PREFIX main installation prefix [/usr/local/musl]
--exec-prefix=EPREFIX installation prefix for executable files [PREFIX]
so in my case both prefix and exec_prefix should be set to
/home/maxd/GNU/lib/musl-1.2.3_gcc-12.1.0
I did not notice this before; but what can I do about it?
On Wed, Mar 08, 2023 at 11:21:35AM +0000, Max R. Dechantsreiter wrote:
> On Tue, Mar 07, 2023 at 08:28:51PM +0000, Ralo Kossovo wrote:
> > Haven't you, by any chance, changed the values of the 'includedir' or
> > 'srcdir' in musl's 'Makefile' or 'config.mak'.
>
> No changes; in Makefile:
>
> srcdir = .
> exec_prefix = /usr/local
> bindir = $(exec_prefix)/bin
>
> prefix = /usr/local/musl
> includedir = $(prefix)/include
> libdir = $(prefix)/lib
> syslibdir = /lib
>
> (excerpted), and the whole config.mak is as follows:
>
> # This version of config.mak was generated by:
> # ./configure --prefix=/home/maxd/GNU/lib/musl-1.2.3_gcc-12.1.0 --target=x86_64 --disable-shared
> # Any changes made here will be lost if configure is re-run
> AR = /home/maxd/GNU/opt/gnu/gcc-12.1.0/bin/gcc-ar
> RANLIB = /home/maxd/GNU/opt/gnu/gcc-12.1.0/bin/gcc-ranlib
> ARCH = x86_64
> SUBARCH =
> ASMSUBARCH =
> srcdir = .
> prefix = /home/maxd/GNU/lib/musl-1.2.3_gcc-12.1.0
> exec_prefix = $(prefix)
> bindir = $(exec_prefix)/bin
> libdir = $(prefix)/lib
> includedir = $(prefix)/include
> syslibdir = /lib
> CC = gcc
> CFLAGS =
> CFLAGS_AUTO = -Os -pipe -fomit-frame-pointer -fno-unwind-tables -fno-asynchronous-unwind-tables -ffunction-sections -fdata-sections -Wno-pointer-to-int-cast -Werror=implicit-function-declaration -Werror=implicit-int -Werror=pointer-sign -Werror=pointer-arith -Werror=int-conversion -Werror=incompatible-pointer-types -Werror=discarded-qualifiers -Werror=discarded-array-qualifiers -Waddress -Warray-bounds -Wchar-subscripts -Wduplicate-decl-specifier -Winit-self -Wreturn-type -Wsequence-point -Wstrict-aliasing -Wunused-function -Wunused-label -Wunused-variable
> CFLAGS_C99FSE = -std=c99 -nostdinc -ffreestanding -fexcess-precision=standard -frounding-math -Wa,--noexecstack
> CFLAGS_MEMOPS = -fno-tree-loop-distribute-patterns
> CFLAGS_NOSSP = -fno-stack-protector
> CPPFLAGS =
> LDFLAGS =
> LDFLAGS_AUTO = -Wl,--sort-section,alignment -Wl,--sort-common -Wl,--gc-sections -Wl,--hash-style=both -Wl,--no-undefined -Wl,--exclude-libs=ALL -Wl,--dynamic-list=./dynamic.list
> CROSS_COMPILE =
> LIBCC = -lgcc -lgcc_eh
> OPTIMIZE_GLOBS = internal/*.c malloc/*.c string/*.c
> ALL_TOOLS = obj/musl-gcc
> TOOL_LIBS = lib/musl-gcc.specs
> ADD_CFI = no
> MALLOC_DIR = mallocng
> SHARED_LIBS =
> WRAPCC_GCC = $(CC)
>
> > What output does running 'grep -rni /usr/include' in musl's root
> > directory generate?
>
> No output:
>
> [/home/maxd/GNU/Build/musl-1.2.3_gcc-12.1.0] 29> grep -rni /usr/include
> [/home/maxd/GNU/Build/musl-1.2.3_gcc-12.1.0] 30>
>
>
> >
> > On 3/7/23, Max R. Dechantsreiter <max@performancejones.com> wrote:
> > > My musl-1.2.3 fails to compile the simple test:
> > >
> > > cat > hello.c <<EOF
> > > #include <stdio.h>
> > > int main()
> > > {
> > > printf("Hello, world!\n");
> > > return 0;
> > > }
> > > EOF
> > > $INSTALL/bin/musl-gcc hello.c
> > > /usr/include/stdio.h:52:9: error: unknown type name '__gnuc_va_list'
> > > 52 | typedef __gnuc_va_list va_list;
> > > | ^~~~~~~~~~~~~~
> > > /usr/include/stdio.h:52:24: error: conflicting types for 'va_list'; have
> > > 'int'
> > > 52 | typedef __gnuc_va_list va_list;
> > > | ^~~~~~~
> > > .
> > > .
> > > .
> > >
> > > I configured musl as follows:
> > >
> > > CC=gcc ./configure \
> > > --prefix=$INSTALL \
> > > --target=x86_64 \
> > > --disable-shared \
> > >>& configure.log
> > > # CROSS_COMPILE configured to "x86_64-":
> > > sed -i 's/\(CROSS_COMPILE = \).*/\1/' config.mak
> > >
> > > and built (cleanly) with GCC 12.1.0 on
> > >
> > > Linux version 4.19.0 (mockbuild@builder1.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
> > >
> > > I had the same problem with GCC 10.2.1.
> > >
> > > Is there a known fix/workaround someone could provide?
> > >
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [musl] unknown type name '__gnuc_va_list'
2023-03-08 11:27 ` Max R. Dechantsreiter
@ 2023-03-08 12:43 ` Ralo Kossovo
2023-03-08 12:47 ` Max R. Dechantsreiter
0 siblings, 1 reply; 15+ messages in thread
From: Ralo Kossovo @ 2023-03-08 12:43 UTC (permalink / raw)
To: musl
On 3/8/23, Max R. Dechantsreiter <max@performancejones.com> wrote:
> so how is it that prefix=/usr/local/musl?
>
> Likewise exec_prefix should not be in system space.
To my knowledge, these defaults get overwritten by 'config.mak' when
it gets included on 'Makefile:78'. That is so that the 'Makefile'
routines get preserved across iterations and work only with changing
variable values, I believe. Essentially, it makes everything more
straight-forward and deterministic - a reason why I was able to refer
you to a specific line of the Makefile.
Feel free to correct me on this if I'm wrong.
Could you, please, share with us the contents of
'$(prefix)/bin/musl-gcc' and '$(prefix)/lib/musl-gcc.specs'?
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [musl] unknown type name '__gnuc_va_list'
2023-03-08 12:43 ` Ralo Kossovo
@ 2023-03-08 12:47 ` Max R. Dechantsreiter
2023-03-08 13:09 ` Max R. Dechantsreiter
0 siblings, 1 reply; 15+ messages in thread
From: Max R. Dechantsreiter @ 2023-03-08 12:47 UTC (permalink / raw)
To: musl
On Wed, Mar 08, 2023 at 12:43:23PM +0000, Ralo Kossovo wrote:
> On 3/8/23, Max R. Dechantsreiter <max@performancejones.com> wrote:
>
> > so how is it that prefix=/usr/local/musl?
> >
> > Likewise exec_prefix should not be in system space.
>
> To my knowledge, these defaults get overwritten by 'config.mak' when
> it gets included on 'Makefile:78'. That is so that the 'Makefile'
> routines get preserved across iterations and work only with changing
> variable values, I believe. Essentially, it makes everything more
> straight-forward and deterministic - a reason why I was able to refer
> you to a specific line of the Makefile.
> Feel free to correct me on this if I'm wrong.
>
> Could you, please, share with us the contents of
> '$(prefix)/bin/musl-gcc' and '$(prefix)/lib/musl-gcc.specs'?
[/home/maxd/GNU/lib/musl-1.2.3_gcc-12.1.0/bin] 28> cat musl-gcc
#!/bin/sh
exec "${REALGCC:-gcc}" "$@" -specs "/home/maxd/GNU/lib/musl-1.2.3_gcc-12.1.0/lib/musl-gcc.specs"
[/home/maxd/GNU/lib/musl-1.2.3_gcc-12.1.0/bin] 29>
[/home/maxd/GNU/lib/musl-1.2.3_gcc-12.1.0/lib] 31> cat musl-gcc.specs
%rename cpp_options old_cpp_options
*cpp_options:
-nostdinc -isystem /home/maxd/GNU/lib/musl-1.2.3_gcc-12.1.0/include -isystem include%s %(old_cpp_options)
*cc1:
%(cc1_cpu) -nostdinc -isystem /home/maxd/GNU/lib/musl-1.2.3_gcc-12.1.0/include -isystem include%s
*link_libgcc:
-L/home/maxd/GNU/lib/musl-1.2.3_gcc-12.1.0/lib -L .%s
*libgcc:
libgcc.a%s %:if-exists(libgcc_eh.a%s)
*startfile:
%{!shared: /home/maxd/GNU/lib/musl-1.2.3_gcc-12.1.0/lib/Scrt1.o} /home/maxd/GNU/lib/musl-1.2.3_gcc-12.1.0/lib/crti.o crtbeginS.o%s
*endfile:
crtendS.o%s /home/maxd/GNU/lib/musl-1.2.3_gcc-12.1.0/lib/crtn.o
*link:
-dynamic-linker /lib/ld-musl-x86_64.so.1 -nostdlib %{shared:-shared} %{static:-static} %{rdynamic:-export-dynamic}
*esp_link:
*esp_options:
*esp_cpp_options:
[/home/maxd/GNU/lib/musl-1.2.3_gcc-12.1.0/lib] 32>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [musl] unknown type name '__gnuc_va_list'
2023-03-08 12:47 ` Max R. Dechantsreiter
@ 2023-03-08 13:09 ` Max R. Dechantsreiter
2023-03-08 13:24 ` Rich Felker
2023-03-08 13:51 ` Ralo Kossovo
0 siblings, 2 replies; 15+ messages in thread
From: Max R. Dechantsreiter @ 2023-03-08 13:09 UTC (permalink / raw)
To: musl
...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!
For what it's worth:
[/home/maxd] 56> cat /proc/version
Linux version 4.19.0 (mockbuild@builder1.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
albeit after running for about the expected time.
Are there other environment variables I should be concerned about?
On Wed, Mar 08, 2023 at 12:47:26PM +0000, Max R. Dechantsreiter wrote:
> On Wed, Mar 08, 2023 at 12:43:23PM +0000, Ralo Kossovo wrote:
> > On 3/8/23, Max R. Dechantsreiter <max@performancejones.com> wrote:
> >
> > > so how is it that prefix=/usr/local/musl?
> > >
> > > Likewise exec_prefix should not be in system space.
> >
> > To my knowledge, these defaults get overwritten by 'config.mak' when
> > it gets included on 'Makefile:78'. That is so that the 'Makefile'
> > routines get preserved across iterations and work only with changing
> > variable values, I believe. Essentially, it makes everything more
> > straight-forward and deterministic - a reason why I was able to refer
> > you to a specific line of the Makefile.
> > Feel free to correct me on this if I'm wrong.
> >
> > Could you, please, share with us the contents of
> > '$(prefix)/bin/musl-gcc' and '$(prefix)/lib/musl-gcc.specs'?
>
> [/home/maxd/GNU/lib/musl-1.2.3_gcc-12.1.0/bin] 28> cat musl-gcc
> #!/bin/sh
> exec "${REALGCC:-gcc}" "$@" -specs "/home/maxd/GNU/lib/musl-1.2.3_gcc-12.1.0/lib/musl-gcc.specs"
> [/home/maxd/GNU/lib/musl-1.2.3_gcc-12.1.0/bin] 29>
>
> [/home/maxd/GNU/lib/musl-1.2.3_gcc-12.1.0/lib] 31> cat musl-gcc.specs
> %rename cpp_options old_cpp_options
>
> *cpp_options:
> -nostdinc -isystem /home/maxd/GNU/lib/musl-1.2.3_gcc-12.1.0/include -isystem include%s %(old_cpp_options)
>
> *cc1:
> %(cc1_cpu) -nostdinc -isystem /home/maxd/GNU/lib/musl-1.2.3_gcc-12.1.0/include -isystem include%s
>
> *link_libgcc:
> -L/home/maxd/GNU/lib/musl-1.2.3_gcc-12.1.0/lib -L .%s
>
> *libgcc:
> libgcc.a%s %:if-exists(libgcc_eh.a%s)
>
> *startfile:
> %{!shared: /home/maxd/GNU/lib/musl-1.2.3_gcc-12.1.0/lib/Scrt1.o} /home/maxd/GNU/lib/musl-1.2.3_gcc-12.1.0/lib/crti.o crtbeginS.o%s
>
> *endfile:
> crtendS.o%s /home/maxd/GNU/lib/musl-1.2.3_gcc-12.1.0/lib/crtn.o
>
> *link:
> -dynamic-linker /lib/ld-musl-x86_64.so.1 -nostdlib %{shared:-shared} %{static:-static} %{rdynamic:-export-dynamic}
>
> *esp_link:
>
>
> *esp_options:
>
>
> *esp_cpp_options:
>
>
> [/home/maxd/GNU/lib/musl-1.2.3_gcc-12.1.0/lib] 32>
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [musl] unknown type name '__gnuc_va_list'
2023-03-08 13:09 ` Max R. Dechantsreiter
@ 2023-03-08 13:24 ` Rich Felker
2023-03-08 13:27 ` Max R. Dechantsreiter
2023-03-08 13:51 ` Ralo Kossovo
1 sibling, 1 reply; 15+ messages in thread
From: Rich Felker @ 2023-03-08 13:24 UTC (permalink / raw)
To: Max R. Dechantsreiter; +Cc: musl
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
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@builder1.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.
Rich
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [musl] unknown type name '__gnuc_va_list'
2023-03-08 13:24 ` Rich Felker
@ 2023-03-08 13:27 ` Max R. Dechantsreiter
0 siblings, 0 replies; 15+ messages in thread
From: Max R. Dechantsreiter @ 2023-03-08 13:27 UTC (permalink / raw)
To: Rich Felker; +Cc: musl
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@builder1.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
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [musl] unknown type name '__gnuc_va_list'
2023-03-08 13:09 ` Max R. Dechantsreiter
2023-03-08 13:24 ` Rich Felker
@ 2023-03-08 13:51 ` Ralo Kossovo
2023-03-08 14:10 ` Max R. Dechantsreiter
1 sibling, 1 reply; 15+ messages in thread
From: Ralo Kossovo @ 2023-03-08 13:51 UTC (permalink / raw)
To: musl
On 3/8/23, Max R. Dechantsreiter <max@performancejones.com> wrote:
> ...I got the "validation test" working by setting C_INCLUDE_PATH:
There's got to be a cleaner way to fix this.
What output does '$ echo | $(prefix)/bin/musl-gcc -E -Wp,-v -'
generate? Does '$(prefix)/include' contain any files, in the first
place?
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [musl] unknown type name '__gnuc_va_list'
2023-03-08 13:51 ` Ralo Kossovo
@ 2023-03-08 14:10 ` Max R. Dechantsreiter
2023-03-08 14:52 ` Ralo Kossovo
0 siblings, 1 reply; 15+ messages in thread
From: Max R. Dechantsreiter @ 2023-03-08 14:10 UTC (permalink / raw)
To: musl
On Wed, Mar 08, 2023 at 01:51:35PM +0000, Ralo Kossovo wrote:
> On 3/8/23, Max R. Dechantsreiter <max@performancejones.com> wrote:
> > ...I got the "validation test" working by setting C_INCLUDE_PATH:
>
> There's got to be a cleaner way to fix this.
> What output does '$ echo | $(prefix)/bin/musl-gcc -E -Wp,-v -'
> generate? Does '$(prefix)/include' contain any files, in the first
> place?
[/home/maxd/GNU/Build/musl-1.2.3_gcc-12.1.0] 28> echo | $INSTALL/bin/musl-gcc -E -Wp,-v -
ignoring duplicate directory "/home/maxd/GNU/lib/musl-1.2.3_gcc-12.1.0/include"
ignoring duplicate directory "/home/maxd/GNU/opt/gnu/gcc-12.1.0/lib/gcc/x86_64-linux-gnu/12.1.0/include"
ignoring duplicate directory "/home/maxd/GNU/lib/musl-1.2.3_gcc-12.1.0/include"
as it is a non-system directory that duplicates a system directory
ignoring duplicate directory "/home/maxd/GNU/opt/gnu/gcc-12.1.0/include"
as it is a non-system directory that duplicates a system directory
ignoring duplicate directory "/usr/include"
as it is a non-system directory that duplicates a system directory
#include "..." search starts here:
#include <...> search starts here:
/home/maxd/GNU/lib/musl-1.2.3_gcc-12.1.0/include
/home/maxd/GNU/opt/gnu/gcc-12.1.0/lib/gcc/x86_64-linux-gnu/12.1.0/include
/home/maxd/GNU/opt/gnu/gcc-12.1.0/include
/usr/include
End of search list.
# 0 "<stdin>"
# 0 "<built-in>"
# 0 "<command-line>"
# 1 "<stdin>"
[/home/maxd/GNU/Build/musl-1.2.3_gcc-12.1.0] 29>
[/home/maxd/GNU/Build/musl-1.2.3_gcc-12.1.0] 29> ls $INSTALL/include
aio.h fcntl.h libintl.h pthread.h stddef.h time.h
alloca.h features.h limits.h pty.h stdint.h uchar.h
ar.h fenv.h link.h pwd.h stdio_ext.h ucontext.h
arpa float.h locale.h regex.h stdio.h ulimit.h
assert.h fmtmsg.h malloc.h resolv.h stdlib.h unistd.h
bits fnmatch.h math.h sched.h stdnoreturn.h utime.h
byteswap.h ftw.h memory.h scsi string.h utmp.h
complex.h getopt.h mntent.h search.h strings.h utmpx.h
cpio.h glob.h monetary.h semaphore.h stropts.h values.h
crypt.h grp.h mqueue.h setjmp.h sys wait.h
ctype.h iconv.h net shadow.h syscall.h wchar.h
dirent.h ifaddrs.h netdb.h signal.h sysexits.h wctype.h
dlfcn.h inttypes.h netinet spawn.h syslog.h wordexp.h
elf.h iso646.h netpacket stdalign.h tar.h
endian.h langinfo.h nl_types.h stdarg.h termios.h
err.h lastlog.h paths.h stdbool.h tgmath.h
errno.h libgen.h poll.h stdc-predef.h threads.h
[/home/maxd/GNU/Build/musl-1.2.3_gcc-12.1.0] 30>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [musl] unknown type name '__gnuc_va_list'
2023-03-08 14:10 ` Max R. Dechantsreiter
@ 2023-03-08 14:52 ` Ralo Kossovo
2023-03-08 15:36 ` Max R. Dechantsreiter
0 siblings, 1 reply; 15+ messages in thread
From: Ralo Kossovo @ 2023-03-08 14:52 UTC (permalink / raw)
To: musl
Are you compiling with the '-static' flag specified?
On 3/8/23, Max R. Dechantsreiter <max@performancejones.com> wrote:
> On Wed, Mar 08, 2023 at 01:51:35PM +0000, Ralo Kossovo wrote:
>> On 3/8/23, Max R. Dechantsreiter <max@performancejones.com> wrote:
>> > ...I got the "validation test" working by setting C_INCLUDE_PATH:
>>
>> There's got to be a cleaner way to fix this.
>> What output does '$ echo | $(prefix)/bin/musl-gcc -E -Wp,-v -'
>> generate? Does '$(prefix)/include' contain any files, in the first
>> place?
>
> [/home/maxd/GNU/Build/musl-1.2.3_gcc-12.1.0] 28> echo |
> $INSTALL/bin/musl-gcc -E -Wp,-v -
> ignoring duplicate directory
> "/home/maxd/GNU/lib/musl-1.2.3_gcc-12.1.0/include"
> ignoring duplicate directory
> "/home/maxd/GNU/opt/gnu/gcc-12.1.0/lib/gcc/x86_64-linux-gnu/12.1.0/include"
> ignoring duplicate directory
> "/home/maxd/GNU/lib/musl-1.2.3_gcc-12.1.0/include"
> as it is a non-system directory that duplicates a system directory
> ignoring duplicate directory "/home/maxd/GNU/opt/gnu/gcc-12.1.0/include"
> as it is a non-system directory that duplicates a system directory
> ignoring duplicate directory "/usr/include"
> as it is a non-system directory that duplicates a system directory
> #include "..." search starts here:
> #include <...> search starts here:
> /home/maxd/GNU/lib/musl-1.2.3_gcc-12.1.0/include
> /home/maxd/GNU/opt/gnu/gcc-12.1.0/lib/gcc/x86_64-linux-gnu/12.1.0/include
> /home/maxd/GNU/opt/gnu/gcc-12.1.0/include
> /usr/include
> End of search list.
> # 0 "<stdin>"
> # 0 "<built-in>"
> # 0 "<command-line>"
> # 1 "<stdin>"
> [/home/maxd/GNU/Build/musl-1.2.3_gcc-12.1.0] 29>
>
> [/home/maxd/GNU/Build/musl-1.2.3_gcc-12.1.0] 29> ls $INSTALL/include
> aio.h fcntl.h libintl.h pthread.h stddef.h time.h
> alloca.h features.h limits.h pty.h stdint.h uchar.h
> ar.h fenv.h link.h pwd.h stdio_ext.h
> ucontext.h
> arpa float.h locale.h regex.h stdio.h ulimit.h
> assert.h fmtmsg.h malloc.h resolv.h stdlib.h unistd.h
> bits fnmatch.h math.h sched.h stdnoreturn.h utime.h
> byteswap.h ftw.h memory.h scsi string.h utmp.h
> complex.h getopt.h mntent.h search.h strings.h utmpx.h
> cpio.h glob.h monetary.h semaphore.h stropts.h values.h
> crypt.h grp.h mqueue.h setjmp.h sys wait.h
> ctype.h iconv.h net shadow.h syscall.h wchar.h
> dirent.h ifaddrs.h netdb.h signal.h sysexits.h wctype.h
> dlfcn.h inttypes.h netinet spawn.h syslog.h wordexp.h
> elf.h iso646.h netpacket stdalign.h tar.h
> endian.h langinfo.h nl_types.h stdarg.h termios.h
> err.h lastlog.h paths.h stdbool.h tgmath.h
> errno.h libgen.h poll.h stdc-predef.h threads.h
> [/home/maxd/GNU/Build/musl-1.2.3_gcc-12.1.0] 30>
>
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [musl] unknown type name '__gnuc_va_list'
2023-03-08 14:52 ` Ralo Kossovo
@ 2023-03-08 15:36 ` Max R. Dechantsreiter
2023-03-09 6:48 ` Ralo Kossovo
0 siblings, 1 reply; 15+ messages in thread
From: Max R. Dechantsreiter @ 2023-03-08 15:36 UTC (permalink / raw)
To: musl
On Wed, Mar 08, 2023 at 02:52:07PM +0000, Ralo Kossovo wrote:
> Are you compiling with the '-static' flag specified?
Yes, I added that.
I have also been able to compile and run a more complex
test (recursive "Queens" backtrack problem). I need to
consult with the author of my intended application to
see what its problem with musl-gcc might be.
Thank you very much for your suggestions!
>
> On 3/8/23, Max R. Dechantsreiter <max@performancejones.com> wrote:
> > On Wed, Mar 08, 2023 at 01:51:35PM +0000, Ralo Kossovo wrote:
> >> On 3/8/23, Max R. Dechantsreiter <max@performancejones.com> wrote:
> >> > ...I got the "validation test" working by setting C_INCLUDE_PATH:
> >>
> >> There's got to be a cleaner way to fix this.
> >> What output does '$ echo | $(prefix)/bin/musl-gcc -E -Wp,-v -'
> >> generate? Does '$(prefix)/include' contain any files, in the first
> >> place?
> >
> > [/home/maxd/GNU/Build/musl-1.2.3_gcc-12.1.0] 28> echo |
> > $INSTALL/bin/musl-gcc -E -Wp,-v -
> > ignoring duplicate directory
> > "/home/maxd/GNU/lib/musl-1.2.3_gcc-12.1.0/include"
> > ignoring duplicate directory
> > "/home/maxd/GNU/opt/gnu/gcc-12.1.0/lib/gcc/x86_64-linux-gnu/12.1.0/include"
> > ignoring duplicate directory
> > "/home/maxd/GNU/lib/musl-1.2.3_gcc-12.1.0/include"
> > as it is a non-system directory that duplicates a system directory
> > ignoring duplicate directory "/home/maxd/GNU/opt/gnu/gcc-12.1.0/include"
> > as it is a non-system directory that duplicates a system directory
> > ignoring duplicate directory "/usr/include"
> > as it is a non-system directory that duplicates a system directory
> > #include "..." search starts here:
> > #include <...> search starts here:
> > /home/maxd/GNU/lib/musl-1.2.3_gcc-12.1.0/include
> > /home/maxd/GNU/opt/gnu/gcc-12.1.0/lib/gcc/x86_64-linux-gnu/12.1.0/include
> > /home/maxd/GNU/opt/gnu/gcc-12.1.0/include
> > /usr/include
> > End of search list.
> > # 0 "<stdin>"
> > # 0 "<built-in>"
> > # 0 "<command-line>"
> > # 1 "<stdin>"
> > [/home/maxd/GNU/Build/musl-1.2.3_gcc-12.1.0] 29>
> >
> > [/home/maxd/GNU/Build/musl-1.2.3_gcc-12.1.0] 29> ls $INSTALL/include
> > aio.h fcntl.h libintl.h pthread.h stddef.h time.h
> > alloca.h features.h limits.h pty.h stdint.h uchar.h
> > ar.h fenv.h link.h pwd.h stdio_ext.h
> > ucontext.h
> > arpa float.h locale.h regex.h stdio.h ulimit.h
> > assert.h fmtmsg.h malloc.h resolv.h stdlib.h unistd.h
> > bits fnmatch.h math.h sched.h stdnoreturn.h utime.h
> > byteswap.h ftw.h memory.h scsi string.h utmp.h
> > complex.h getopt.h mntent.h search.h strings.h utmpx.h
> > cpio.h glob.h monetary.h semaphore.h stropts.h values.h
> > crypt.h grp.h mqueue.h setjmp.h sys wait.h
> > ctype.h iconv.h net shadow.h syscall.h wchar.h
> > dirent.h ifaddrs.h netdb.h signal.h sysexits.h wctype.h
> > dlfcn.h inttypes.h netinet spawn.h syslog.h wordexp.h
> > elf.h iso646.h netpacket stdalign.h tar.h
> > endian.h langinfo.h nl_types.h stdarg.h termios.h
> > err.h lastlog.h paths.h stdbool.h tgmath.h
> > errno.h libgen.h poll.h stdc-predef.h threads.h
> > [/home/maxd/GNU/Build/musl-1.2.3_gcc-12.1.0] 30>
> >
> >
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [musl] unknown type name '__gnuc_va_list'
2023-03-08 15:36 ` Max R. Dechantsreiter
@ 2023-03-09 6:48 ` Ralo Kossovo
0 siblings, 0 replies; 15+ messages in thread
From: Ralo Kossovo @ 2023-03-09 6:48 UTC (permalink / raw)
To: musl
[-- Attachment #1: Type: text/plain, Size: 3750 bytes --]
Good.
I hope I've been of some help, indeed.
On 8 March 2023 16:36:29 CET, "Max R. Dechantsreiter" <max@performancejones.com> wrote:
>On Wed, Mar 08, 2023 at 02:52:07PM +0000, Ralo Kossovo wrote:
>> Are you compiling with the '-static' flag specified?
>
>Yes, I added that.
>
>I have also been able to compile and run a more complex
>test (recursive "Queens" backtrack problem). I need to
>consult with the author of my intended application to
>see what its problem with musl-gcc might be.
>
>Thank you very much for your suggestions!
>
>
>>
>> On 3/8/23, Max R. Dechantsreiter <max@performancejones.com> wrote:
>> > On Wed, Mar 08, 2023 at 01:51:35PM +0000, Ralo Kossovo wrote:
>> >> On 3/8/23, Max R. Dechantsreiter <max@performancejones.com> wrote:
>> >> > ...I got the "validation test" working by setting C_INCLUDE_PATH:
>> >>
>> >> There's got to be a cleaner way to fix this.
>> >> What output does '$ echo | $(prefix)/bin/musl-gcc -E -Wp,-v -'
>> >> generate? Does '$(prefix)/include' contain any files, in the first
>> >> place?
>> >
>> > [/home/maxd/GNU/Build/musl-1.2.3_gcc-12.1.0] 28> echo |
>> > $INSTALL/bin/musl-gcc -E -Wp,-v -
>> > ignoring duplicate directory
>> > "/home/maxd/GNU/lib/musl-1.2.3_gcc-12.1.0/include"
>> > ignoring duplicate directory
>> > "/home/maxd/GNU/opt/gnu/gcc-12.1.0/lib/gcc/x86_64-linux-gnu/12.1.0/include"
>> > ignoring duplicate directory
>> > "/home/maxd/GNU/lib/musl-1.2.3_gcc-12.1.0/include"
>> > as it is a non-system directory that duplicates a system directory
>> > ignoring duplicate directory "/home/maxd/GNU/opt/gnu/gcc-12.1.0/include"
>> > as it is a non-system directory that duplicates a system directory
>> > ignoring duplicate directory "/usr/include"
>> > as it is a non-system directory that duplicates a system directory
>> > #include "..." search starts here:
>> > #include <...> search starts here:
>> > /home/maxd/GNU/lib/musl-1.2.3_gcc-12.1.0/include
>> > /home/maxd/GNU/opt/gnu/gcc-12.1.0/lib/gcc/x86_64-linux-gnu/12.1.0/include
>> > /home/maxd/GNU/opt/gnu/gcc-12.1.0/include
>> > /usr/include
>> > End of search list.
>> > # 0 "<stdin>"
>> > # 0 "<built-in>"
>> > # 0 "<command-line>"
>> > # 1 "<stdin>"
>> > [/home/maxd/GNU/Build/musl-1.2.3_gcc-12.1.0] 29>
>> >
>> > [/home/maxd/GNU/Build/musl-1.2.3_gcc-12.1.0] 29> ls $INSTALL/include
>> > aio.h fcntl.h libintl.h pthread.h stddef.h time.h
>> > alloca.h features.h limits.h pty.h stdint.h uchar.h
>> > ar.h fenv.h link.h pwd.h stdio_ext.h
>> > ucontext.h
>> > arpa float.h locale.h regex.h stdio.h ulimit.h
>> > assert.h fmtmsg.h malloc.h resolv.h stdlib.h unistd.h
>> > bits fnmatch.h math.h sched.h stdnoreturn.h utime.h
>> > byteswap.h ftw.h memory.h scsi string.h utmp.h
>> > complex.h getopt.h mntent.h search.h strings.h utmpx.h
>> > cpio.h glob.h monetary.h semaphore.h stropts.h values.h
>> > crypt.h grp.h mqueue.h setjmp.h sys wait.h
>> > ctype.h iconv.h net shadow.h syscall.h wchar.h
>> > dirent.h ifaddrs.h netdb.h signal.h sysexits.h wctype.h
>> > dlfcn.h inttypes.h netinet spawn.h syslog.h wordexp.h
>> > elf.h iso646.h netpacket stdalign.h tar.h
>> > endian.h langinfo.h nl_types.h stdarg.h termios.h
>> > err.h lastlog.h paths.h stdbool.h tgmath.h
>> > errno.h libgen.h poll.h stdc-predef.h threads.h
>> > [/home/maxd/GNU/Build/musl-1.2.3_gcc-12.1.0] 30>
>> >
>> >
[-- Attachment #2: Type: text/html, Size: 4603 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2023-03-09 6:48 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-07 13:48 [musl] unknown type name '__gnuc_va_list' Max R. Dechantsreiter
2023-03-07 19:37 ` Szabolcs Nagy
2023-03-07 20:28 ` Ralo Kossovo
2023-03-08 11:21 ` Max R. Dechantsreiter
2023-03-08 11:27 ` Max R. Dechantsreiter
2023-03-08 12:43 ` Ralo Kossovo
2023-03-08 12:47 ` Max R. Dechantsreiter
2023-03-08 13:09 ` Max R. Dechantsreiter
2023-03-08 13:24 ` Rich Felker
2023-03-08 13:27 ` Max R. Dechantsreiter
2023-03-08 13:51 ` Ralo Kossovo
2023-03-08 14:10 ` Max R. Dechantsreiter
2023-03-08 14:52 ` Ralo Kossovo
2023-03-08 15:36 ` Max R. Dechantsreiter
2023-03-09 6:48 ` Ralo Kossovo
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).