tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Missing symbol on Alpine Linux / Musl


From: Steffen Nurpmeso
Subject: Re: [Tinycc-devel] Missing symbol on Alpine Linux / Musl
Date: Fri, 29 Sep 2017 22:43:28 +0200
User-agent: s-nail v14.9.4

i wrote:
 ||I thought i provide a tinycc package for Alpine Linux/musl because
 ||it is missing there, but from [] as of 2017-09-26 i get "implicit
 ||declaration" errors for
 ||
 ||  '__builtin_va_end'
 ||  '__builtin_va_start'
 ||  '__builtin_va_arg'
 ||
 ||This comes from /usr/include/stdarg.h,
 ||/usr/lib/tcc/include/stdarg.h is not inspected.
 |
 |So all is fine if i force /usr/lib/tcc/include into
 |$C_INCLUDE_PATH, but why isn't that automatic.   Looking
 |tcc_add_include_path(), and around, and..
 |
 |  address@hidden nail.git]$ tcc -print-search-dirs
 |  install: /usr/lib/tcc
 |  include:
 |    /usr/lib/tcc/include
 |    /usr/local/include
 |    /usr/include

This actually is a lie as it does not take into account
C_INCLUDE_PATH mess me thinks:

  address@hidden tmp]$ /home/steffen/code.arena/tinycc.git/tcc 
-print-search-dirs
  ADD_SYSINCLUDE {B}/include:/usr/local/include:/usr/include
  SPLIT_PATH /home/steffen/usr/opt/tcc-mob/lib/tcc/include
  SPLIT_PATH /usr/local/include
  SPLIT_PATH /usr/include
  SPLIT_PATH /usr/lib
  SPLIT_PATH /lib
  SPLIT_PATH /usr/local/lib
  SPLIT_PATH /usr/lib
  install: /home/steffen/usr/opt/tcc-mob/lib/tcc
  include:
    /home/steffen/usr/opt/tcc-mob/lib/tcc/include
    /usr/local/include
    /usr/include
  libraries:
    /usr/lib
    /lib
    /usr/local/lib
  crt:
    /usr/lib
  libtcc1:
    /home/steffen/usr/opt/tcc-mob/lib/tcc/libtcc1.a
  elfinterp:
    /lib/ld-musl-x86_64.so.1

Compare this:

  address@hidden tmp]$ /home/steffen/code.arena/tinycc.git/tcc -o zt t.c
  ADD_INCLUDE /home/steffen/usr/include:/usr/local/include:/usr/include
  SPLIT_PATH /home/steffen/usr/include
  SPLIT_PATH /usr/local/include
  SPLIT_PATH /usr/include
  SPLIT_PATH /home/steffen/usr/lib
  SPLIT_PATH /lib
  SPLIT_PATH /usr/local/lib
  SPLIT_PATH /usr/lib
  ADD_SYSINCLUDE {B}/include:/usr/local/include:/usr/include
  SPLIT_PATH /home/steffen/usr/opt/tcc-mob/lib/tcc/include
  SPLIT_PATH /usr/local/include
  SPLIT_PATH /usr/include
  SPLIT_PATH /usr/lib
  SPLIT_PATH /lib
  SPLIT_PATH /usr/local/lib
  SPLIT_PATH /usr/lib
  t.c: **** new file
  t.c: including /usr/include/stdio.h
  #ifndef _STDIO_H
  /usr/include/stdio.h: including /usr/include/features.h
  #ifndef _FEATURES_H
  #endif _FEATURES_H
  adding cached '/usr/include/features.h'
  /usr/include/stdio.h: including /usr/include/bits/alltypes.h
  #endif _STDIO_H
  adding cached '/usr/include/stdio.h'
  t.c: including /usr/include/stdarg.h
  #ifndef _STDARG_H
  /usr/include/stdarg.h: including /usr/include/bits/alltypes.h
  #endif _STDARG_H
  adding cached '/usr/include/stdarg.h'
  t.c:8: warning: implicit declaration of function '__builtin_va_start'
  t.c:8: error: 'vl' undeclared

The {B} should always be searched first i would say, since
compiler specifics are runtime environment critical and should not
be affected by user modifications.  What do you think?

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]