Package: tcc
Version: 0.9.27-8
Severity: normal

Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?
Creating 32-bit executables on a 64-bit debian machine.

   * What exactly did you do (or not do) that was effective (or
     ineffective)?
$ i386-tcc -Wall hello.c -o hello.tcc.i686

   * What was the outcome of this action?
$ i386-tcc -Wall hello.c -o hello.tcc.i686
tcc: error: file 'crt1.o' not found
tcc: error: file 'crti.o' not found
tcc: error: library 'c' not found
tcc: error: file 'crtn.o' not found
tcc: error: undefined symbol 'printf'
   
   * What outcome did you expect instead?
no error and the creation of the executable

Note, that multilib is installed
$ gcc -Wall -m32 hello.c -o hello.gcc.i686
$ ./hello.gcc.i686
sizeof(char *) = 32 bit

Note that tcc itself works
$ tcc -Wall hello.c -o hello.tcc.x86_64
$ ./hello.tcc.x86_64 
sizeof(char *) = 64 bit

$cat hello.c
#include <stdio.h>
int main() {
  int socp = (int) (sizeof(char *)*8);
  printf("sizeof(char *) = %02d bit\n", socp);
}


verbose tcc output
$ i386-tcc -Wall -vv hello.c -o hello.tcc.i686
tcc version 0.9.27 (i386 Linux)
tcc: error: file 'crt1.o' not found
tcc: error: file 'crti.o' not found
-> hello.c
-> /usr/include/stdio.h
->  /usr/include/bits/libc-header-start.h
->   /usr/include/features.h
->    /usr/include/stdc-predef.h
->    /usr/include/sys/cdefs.h
->     /usr/include/bits/wordsize.h
->     /usr/include/bits/long-double.h
->    /usr/include/gnu/stubs.h
->     /usr/include/gnu/stubs-32.h
->  /usr/lib/x86_64-linux-gnu/tcc/include/stddef.h
->  /usr/lib/x86_64-linux-gnu/tcc/include/stdarg.h
->  /usr/include/bits/types.h
->   /usr/include/bits/wordsize.h
->   /usr/include/bits/typesizes.h
->  /usr/include/bits/types/__fpos_t.h
->   /usr/include/bits/types/__mbstate_t.h
->  /usr/include/bits/types/__fpos64_t.h
->  /usr/include/bits/types/__FILE.h
->  /usr/include/bits/types/FILE.h
->  /usr/include/bits/types/struct_FILE.h
->  /usr/include/bits/stdio_lim.h
->  /usr/include/bits/sys_errlist.h
tcc: error: library 'c' not found
-> /usr/lib/x86_64-linux-gnu/tcc/i386-libtcc1.a
tcc: error: file 'crtn.o' not found
tcc: error: undefined symbol 'printf'


*** End of the template - remove these template lines ***


-- System Information:
Debian Release: 10.1
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.2.11-1.el7.elrepo.x86_64 (SMP w/12 CPU cores)
Kernel taint flags: TAINT_WARN
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages tcc depends on:
ii  libc6  2.28-10

Versions of packages tcc recommends:
ii  libc6-dev [libc-dev]  2.28-10

tcc suggests no packages.

-- no debconf information

Reply via email to