Re: [Tinycc-devel] Fwd: Bug#675024: tcc: errors Symbol `mpfr_xxx' causes overflow in R_X86_64_PC32 relocation

2014-04-04 Thread Vincent Lefevre
Hi,

On 2014-04-02 21:45:54 +0200, Michael Matz wrote:
 On Wed, 2 Apr 2014, Michael Matz wrote:
 Another report about the current state of shared libraries produced by
 tcc. Michael, I'm just copying it here because you asked. It's ok if you
 don't want or can't work on this.
 
 Reporting it here is fine, especially with reduced testcases.  That was
 the point :)  (And yeah, I'll work on it when time and mood permits)
 
 Actually I just fixed a similar error for gawk (libtcc1.a containing non-PIC
 code), which has exactly that symptom ('abort' and _PC32 reloc overflowing).
 So it's worth a new try with mob branch.

This doesn't change anything in MPFR:

ypig:...ftware/mpfr/tests ./texceptions
./texceptions: Symbol `stderr' causes overflow in R_X86_64_PC32 relocation
./texceptions: Symbol `abort' causes overflow in R_X86_64_PC32 relocation
zsh: segmentation fault (core dumped)  ./texceptions

I don't know the cause of the segmentation fault. Other tests give
error messages, but they don't fail:

ypig:...ftware/mpfr/tests ./tversion
./tversion: Symbol `stderr' causes overflow in R_X86_64_PC32 relocation
./tversion: Symbol `abort' causes overflow in R_X86_64_PC32 relocation
[tversion] GMP: header 6.0.0, library 6.0.0
[tversion] MPFR tuning parameters from default

-- 
Vincent Lefèvre vinc...@vinc17.net - Web: https://www.vinc17.net/
100% accessible validated (X)HTML - Blog: https://www.vinc17.net/blog/
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] Fwd: Bug#675024: tcc: errors Symbol `mpfr_xxx' causes overflow in R_X86_64_PC32 relocation

2014-04-04 Thread Michael Matz

Hi,

On Fri, 4 Apr 2014, Vincent Lefevre wrote:


Actually I just fixed a similar error for gawk (libtcc1.a containing non-PIC
code), which has exactly that symptom ('abort' and _PC32 reloc overflowing).
So it's worth a new try with mob branch.


This doesn't change anything in MPFR:

ypig:...ftware/mpfr/tests ./texceptions
./texceptions: Symbol `stderr' causes overflow in R_X86_64_PC32 relocation
./texceptions: Symbol `abort' causes overflow in R_X86_64_PC32 relocation
zsh: segmentation fault (core dumped)  ./texceptions


Have you rebuilt libtcc1.a (e.g. make clean before redoing make in tcc)? 
And reinstalled it?  How did you configure tinycc?  How did you configure 
mpfr.  Because I can't reproduce:


% tcc ./configure  make -j8
% tcc cd /tmp/mpfr-3.1.2
% mpfr-3.1.2 CC=/matz/git/tinycc/tcc -B/matz/git/tinycc/ ./configure
...
% mpfr-3.1.2 make -j8  make check
...
[tversion] GMP: header 5.0.2, library 5.0.2
[tversion] MPFR tuning parameters from default
PASS: tversion

All 160 tests passed
(1 test was not run)

...

(The skipped test is tget_set_d64).  In particular:

% mpfr-3.1.2 cd tests  ./texceptions
% tests echo $?
0
% ldd ./texceptions
linux-vdso.so.1 =  (0x7fffd336f000)
libm.so.6 = /lib64/libm.so.6 (0x7f36ffd28000)
libc.so.6 = /lib64/libc.so.6 (0x7f36ff9bb000)
libmpfr.so.4 = /tmp/mpfr-3.1.2/src/.libs/libmpfr.so.4 
(0x7f36ff714000)
libgmp.so.10 = /usr/lib64/libgmp.so.10 (0x7f36ff496000)
/lib64/ld-linux-x86-64.so.2 (0x7f36fff7f000)


Ciao,
Michael.

___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] Fwd: Bug#675024: tcc: errors Symbol `mpfr_xxx' causes overflow in R_X86_64_PC32 relocation

2014-04-04 Thread Vincent Lefevre
On 2014-04-04 20:52:13 +0200, Michael Matz wrote:
 Hi,
 
 On Fri, 4 Apr 2014, Vincent Lefevre wrote:
 
 Actually I just fixed a similar error for gawk (libtcc1.a containing non-PIC
 code), which has exactly that symptom ('abort' and _PC32 reloc overflowing).
 So it's worth a new try with mob branch.
 
 This doesn't change anything in MPFR:
 
 ypig:...ftware/mpfr/tests ./texceptions
 ./texceptions: Symbol `stderr' causes overflow in R_X86_64_PC32 relocation
 ./texceptions: Symbol `abort' causes overflow in R_X86_64_PC32 relocation
 zsh: segmentation fault (core dumped)  ./texceptions
 
 Have you rebuilt libtcc1.a (e.g. make clean before redoing make in tcc)?

I didn't do make clean (I thought dependency rules would have
rebuilt it). Problem solved after make clean and reinstall.

-- 
Vincent Lefèvre vinc...@vinc17.net - Web: https://www.vinc17.net/
100% accessible validated (X)HTML - Blog: https://www.vinc17.net/blog/
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


[Tinycc-devel] Fwd: Bug#675024: tcc: errors Symbol `mpfr_xxx' causes overflow in R_X86_64_PC32 relocation

2014-04-01 Thread Thomas Preudhomme
Another report about the current state of shared libraries produced by 
tcc. Michael, I'm just copying it here because you asked. It's ok if you 
don't want or can't work on this.


Best regards,

Thomas

 Message original 
Objet: Bug#675024: tcc: errors Symbol `mpfr_xxx' causes overflow in 
R_X86_64_PC32 relocation

Date: 2014-04-01 07:15
De: Vincent Lefevre vinc...@vinc17.net
À: Thomas Preud'homme robo...@debian.org
Cc: 675...@bugs.debian.org
Répondre à: Vincent Lefevre vinc...@vinc17.net, 
675...@bugs.debian.org


Control: tags -1 - fixed-upstream

On 2014-03-31 22:22:03 +0800, Thomas Preud'homme wrote:

Two commits were done upstream to fix this bug. The author (Michael
Matz) would appreciate some testing to see if it works correctly.


With MPFR 3.1.2 configured with ./configure CC=tcc, I still get
Symbol `...' causes overflow in R_X86_64_PC32 relocation messages,
but the tests no longer fail... except texceptions.

Actually the symbols are no longer mpfr_xxx, but libc functions, e.g.

ypig:.../mpfr-3.1.2/tests ./texceptions
./texceptions: Symbol `abort' causes overflow in R_X86_64_PC32 
relocation

zsh: segmentation fault (core dumped)  ./texceptions

I'm not sure whether this is related, but it seems so, because
if I configure MPFR with ./configure --disable-shared CC=tcc,
all tests pass.

I could reduce texceptions.c to:

#include mpfr-test.h

int
main (void)
{
  (mpfr_clear_flags)();
  return 0;
}

Then I get:

ypig:.../mpfr-3.1.2/tests ./texceptions
zsh: segmentation fault (core dumped)  ./texceptions

The message has disappeared, but it still crashes.

--
Vincent Lefèvre vinc...@vinc17.net - Web: https://www.vinc17.net/
100% accessible validated (X)HTML - Blog: 
https://www.vinc17.net/blog/

Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel