mailing list of musl libc
 help / color / mirror / code / Atom feed
From: "Max R. Dechantsreiter" <max@performancejones.com>
To: musl@lists.openwall.com
Subject: Re: [musl] unknown type name '__gnuc_va_list'
Date: Wed, 8 Mar 2023 11:21:35 +0000	[thread overview]
Message-ID: <ZAhvvx+oc099bWEl@localhost.localdomain> (raw)
In-Reply-To: <CAGg4HhSODXRuMrK8O9=HhCxQRoq12Sazy+JMNJ-U9J722Oc6Rg@mail.gmail.com>

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?
> >

  reply	other threads:[~2023-03-08 11:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-07 13:48 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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZAhvvx+oc099bWEl@localhost.localdomain \
    --to=max@performancejones.com \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).