Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#37538 - [tcc] libtcc.so doesn't work (fix included)

Attached to Project: Community Packages
Opened by Jun Wu (quark) - Tuesday, 29 October 2013, 10:20 GMT
Last edited by Sergej Pupykin (sergej) - Tuesday, 29 October 2013, 14:08 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sergej Pupykin (sergej)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
libtcc.so is incorrected generated and doesn't work.

Additional info:
tcc 0.9.26-1

Steps to reproduce:
$ cat > t.c
#ifdef __amd64
# define TCC_TARGET_X86_64
#endif

#include <libtcc.h>

int main(int argc, char const *argv[]) {
TCCState *state = tcc_new();
tcc_delete(state);
return 0;
}
^D

$ gcc t.c -ldl -ltcc
# A lot of undefined references error


Suggest Fix:
Change PKGBUILD to include all .o files when generating the .so file:

47,48c47,48
< make CFLAGS="-fPIC" libtcc.o
< ld -shared -soname libtcc.so -o libtcc.so libtcc.o
---
> make CFLAGS="-fPIC"
> ld -shared -soname libtcc.so -o libtcc.so i386-asm.o libtcc.o tccasm.o tccelf.o tccgen.o tcc.o tccpp.o tccrun.o x86_64-gen.o
This task depends upon

Closed by  Sergej Pupykin (sergej)
Tuesday, 29 October 2013, 14:08 GMT
Reason for closing:  Fixed

Loading...