View previous topic :: View next topic |
Author |
Message |
RayDude Advocate
Joined: 29 May 2004 Posts: 2052 Location: San Jose, CA
|
Posted: Tue May 23, 2017 9:55 pm Post subject: Old Software needs old glibc. seg faults with new glibc |
|
|
I'm trying to install Altera Quartus 13.1 circa 2013. This tool was likely built with glibc 2.17.
When I run the installer, I get a seg fault in glibc but absolutely no clue which function is being called.
I had this running as recently as 2015 and it was working just fine.
This is the only error I get, from dmesg:
Code: | [19686.184718] QuartusSetupWeb[16764]: segfault at 18 ip 00000000f75ad800 sp 00000000ffb6f984 error 4 in libc-2.23.so[f74b8000+1a4000] |
I really don't like running Quartus in my Windows 10 VM, even though it is working...
Does anyone happen to have any idea how I can attack this? _________________ Some day there will only be free software. |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21489
|
Posted: Wed May 24, 2017 1:24 am Post subject: |
|
|
Collect a core file. Examine the backtrace using gdb. You may need to rebuild glibc and/or Quartus with symbols first. If so, see Quality Assurance/Backtraces for instructions on how to configure Portage to save the required information. |
|
Back to top |
|
|
RayDude Advocate
Joined: 29 May 2004 Posts: 2052 Location: San Jose, CA
|
Posted: Wed May 24, 2017 9:23 pm Post subject: |
|
|
Hu wrote: | Collect a core file. Examine the backtrace using gdb. You may need to rebuild glibc and/or Quartus with symbols first. If so, see Quality Assurance/Backtraces for instructions on how to configure Portage to save the required information. |
Thanks for the reply.
I'm not sure I have time for that. I did run it with gdb, but no backtrace was available, even thought glibc was build with the debug option. I think that means the tool has been fully stripped... _________________ Some day there will only be free software. |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
|
RayDude Advocate
Joined: 29 May 2004 Posts: 2052 Location: San Jose, CA
|
Posted: Wed May 24, 2017 10:12 pm Post subject: |
|
|
Jaglover wrote: | You can run some other Linux in a virtual machine. |
Thanks. Thought of that, but I already have a Win 10 VM and don't have the memory for another VM. Who builds a laptop in 2016 that maxes out at 16GB, I mean really?
I really want glibc to be slotted or perhaps have a sandbox or something, but I don't think that can happen. _________________ Some day there will only be free software. |
|
Back to top |
|
|
Naib Watchman
Joined: 21 May 2004 Posts: 6051 Location: Removed by Neddy
|
Posted: Wed May 24, 2017 10:34 pm Post subject: |
|
|
what does "ldd $NAME_OF_EXECUTABLE" show?
is there a local library directory?
If there is, is there a local libstd++ ?
can you "strace $NAME_OF_EXECUTABLE" _________________
Quote: | Removed by Chiitoo |
|
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21489
|
Posted: Thu May 25, 2017 1:05 am Post subject: |
|
|
RayDude wrote: | I'm not sure I have time for that. I did run it with gdb, but no backtrace was available, even thought glibc was build with the debug option. I think that means the tool has been fully stripped... | You can use file to check whether the file is stripped. You should be able to get a partial backtrace out of libc up to the first application frame even if the application was stripped.
sys-libs/glibc has a USE flag debug which is not what you should be using here. Your phrasing is ambiguous as to whether you set that USE flag or followed the instructions in the link I provided above. In either case, you should also rebuild QuartusSetupWeb with debug symbols. |
|
Back to top |
|
|
pigeon768 l33t
Joined: 02 Jan 2006 Posts: 683
|
Posted: Fri Jun 02, 2017 7:59 pm Post subject: |
|
|
Run it with LD_PRELOAD=/lib/libSegFault.so Code: | pigeon@gauss ~ $ cat bttest.c
#include <stdio.h>
int foo(int a) { return *(int*)a; }
int bar(int a) {
if(a) return bar(a-1);
else return foo(a);
}
int main() {
printf("%d\n",bar(10));
return 0;
}
pigeon@gauss ~ $ gcc bttest.c -o bttest
bttest.c: In function ‘foo’:
bttest.c:3:26: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
int foo(int a) { return *(int*)a; }
^
pigeon@gauss ~ $ strip bttest
pigeon@gauss ~ $ ./bttest
Segmentation fault
pigeon@gauss ~ $ LD_PRELOAD="/lib/libSegFault.so" ./bttest
*** Segmentation fault
Register dump:
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 00007ffdc0eb8098 RSI: 00007ffdc0eb8088 RDI: 0000000000000000
RBP: 00007ffdc0eb7e30 R8 : 00000000004005b0 R9 : 00007f687153b950
R10: 0000000000000008 R11: 0000000000000246 R12: 00000000004003e0
R13: 00007ffdc0eb8080 R14: 0000000000000000 R15: 0000000000000000
RSP: 00007ffdc0eb7e30
RIP: 00000000004004e2 EFLAGS: 00010246
CS: 0033 FS: 0000 GS: 0000
Trap: 0000000e Error: 00000004 OldMask: 00000000 CR2: 00000000
FPUCW: 0000037f FPUSW: 00000000 TAG: 00000000
RIP: 00000000 RDP: 00000000
ST(0) 0000 0000000000000000 ST(1) 0000 0000000000000000
ST(2) 0000 0000000000000000 ST(3) 0000 0000000000000000
ST(4) 0000 0000000000000000 ST(5) 0000 0000000000000000
ST(6) 0000 0000000000000000 ST(7) 0000 0000000000000000
mxcsr: 1f80
XMM0: 00000000000000000000000000000000 XMM1: 00000000000000000000000000000000
XMM2: 00000000000000000000000000000000 XMM3: 00000000000000000000000000000000
XMM4: 00000000000000000000000000000000 XMM5: 00000000000000000000000000000000
XMM6: 00000000000000000000000000000000 XMM7: 00000000000000000000000000000000
XMM8: 00000000000000000000000000000000 XMM9: 00000000000000000000000000000000
XMM10: 00000000000000000000000000000000 XMM11: 00000000000000000000000000000000
XMM12: 00000000000000000000000000000000 XMM13: 00000000000000000000000000000000
XMM14: 00000000000000000000000000000000 XMM15: 00000000000000000000000000000000
Backtrace:
./bttest[0x4004e2]
./bttest[0x400510]
./bttest[0x400504]
./bttest[0x400504]
./bttest[0x400504]
./bttest[0x400504]
./bttest[0x400504]
./bttest[0x400504]
./bttest[0x400504]
./bttest[0x400504]
./bttest[0x400504]
./bttest[0x400504]
./bttest[0x400520]
/lib64/libc.so.6(__libc_start_main+0xf1)[0x7f6870fb01e1]
./bttest[0x40040a]
Memory map:
00400000-00401000 r-xp 00000000 00:10 78991058 /home/pigeon/bttest
00600000-00601000 r--p 00000000 00:10 78991058 /home/pigeon/bttest
00601000-00602000 rw-p 00001000 00:10 78991058 /home/pigeon/bttest
025ce000-025ef000 rw-p 00000000 00:00 0 [heap]
7f6870d79000-7f6870d8e000 r-xp 00000000 00:10 74872095 /usr/lib64/gcc/x86_64-pc-linux-gnu/6.3.0/libgcc_s.so.1
7f6870d8e000-7f6870f8e000 ---p 00015000 00:10 74872095 /usr/lib64/gcc/x86_64-pc-linux-gnu/6.3.0/libgcc_s.so.1
7f6870f8e000-7f6870f8f000 r--p 00015000 00:10 74872095 /usr/lib64/gcc/x86_64-pc-linux-gnu/6.3.0/libgcc_s.so.1
7f6870f8f000-7f6870f90000 rw-p 00016000 00:10 74872095 /usr/lib64/gcc/x86_64-pc-linux-gnu/6.3.0/libgcc_s.so.1
7f6870f90000-7f687111d000 r-xp 00000000 00:10 61343347 /lib64/libc-2.24.so
7f687111d000-7f687131d000 ---p 0018d000 00:10 61343347 /lib64/libc-2.24.so
7f687131d000-7f6871321000 r--p 0018d000 00:10 61343347 /lib64/libc-2.24.so
7f6871321000-7f6871323000 rw-p 00191000 00:10 61343347 /lib64/libc-2.24.so
7f6871323000-7f6871327000 rw-p 00000000 00:00 0
7f6871327000-7f687132b000 r-xp 00000000 00:10 61343269 /lib64/libSegFault.so
7f687132b000-7f687152a000 ---p 00004000 00:10 61343269 /lib64/libSegFault.so
7f687152a000-7f687152b000 r--p 00003000 00:10 61343269 /lib64/libSegFault.so
7f687152b000-7f687152c000 rw-p 00004000 00:10 61343269 /lib64/libSegFault.so
7f687152c000-7f687154f000 r-xp 00000000 00:10 61343336 /lib64/ld-2.24.so
7f6871726000-7f6871728000 rw-p 00000000 00:00 0
7f687174c000-7f687174e000 rw-p 00000000 00:00 0
7f687174e000-7f687174f000 r--p 00022000 00:10 61343336 /lib64/ld-2.24.so
7f687174f000-7f6871750000 rw-p 00023000 00:10 61343336 /lib64/ld-2.24.so
7f6871750000-7f6871751000 rw-p 00000000 00:00 0
7ffdc0e99000-7ffdc0eba000 rw-p 00000000 00:00 0 [stack]
7ffdc0ec7000-7ffdc0ec9000 r--p 00000000 00:00 0 [vvar]
7ffdc0ec9000-7ffdc0ecb000 r-xp 00000000 00:00 0 [vdso]
Segmentation fault | It won't fix your problem, but it should tell you where the problem is occurring, stripped executable or not. |
|
Back to top |
|
|
RayDude Advocate
Joined: 29 May 2004 Posts: 2052 Location: San Jose, CA
|
Posted: Mon Jun 05, 2017 5:20 pm Post subject: |
|
|
pigeon768 wrote: | Run it with LD_PRELOAD=/lib/libSegFault.so
...
It won't fix your problem, but it should tell you where the problem is occurring, stripped executable or not. |
Thanks. I'll give it a shot. _________________ Some day there will only be free software. |
|
Back to top |
|
|
RayDude Advocate
Joined: 29 May 2004 Posts: 2052 Location: San Jose, CA
|
Posted: Thu Jun 08, 2017 8:20 pm Post subject: |
|
|
I tried it, but the output is mostly greek to me.
I don't know why it complains it can't load the ELF, but then does so anyway. The crash seems to be coming from a glibc call from freetype.
I'm not entirely sure where to go from here.
Code: | env SEGFAULT_SIGNALS="abrt segv" LD_PRELOAD=/lib32/libSegFault.so ./setup.sh
ERROR: ld.so: object '/lib32/libSegFault.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/lib32/libSegFault.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/lib32/libSegFault.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
Note: You must have the 32-bit compatibility libraries installed for the Quartus II installer and software to operate properly.
ERROR: ld.so: object '/lib32/libSegFault.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
*** Segmentation fault
Register dump:
EAX: f750c700 EBX: f76b4000 ECX: f7602ae0 EDX: 00000001
ESI: 00000001 EDI: 00000000 EBP: ffbd338c ESP: ffbd3324
EIP: f7602b00 EFLAGS: 00010292
CS: 0023 DS: 002b ES: 002b FS: 0000 GS: 0063 SS: 002b
Trap: 0000000e Error: 00000004 OldMask: 00000000
ESP/signal: ffbd3324 CR2: 00000018
FPUCW: ffff037f FPUSW: ffff0022 TAG: ffffffff
IPOFF: f7106a2e CSSEL: 0023 DATAOFF: 0000ffff DATASEL: 002b
ST(0) 0000 0000000000000000 ST(1) 0000 0000000000000000
ST(2) 0000 0000000000000000 ST(3) 0000 8000000000000000
ST(4) 0000 c49ba5e000000000 ST(5) 0000 0000000000000000
ST(6) 0000 81718174cfe61800 ST(7) 0000 8000000000000000
Backtrace:
/lib32/libc.so.6(__longjmp_chk+0x20)[0xf7602b00]
/usr/lib32/libfreetype.so.6(+0x5247e)[0xf707a47e]
/tmp/brULSGr1(png_error+0x61)[0xf6968931]
/tmp/brULSGr1(png_create_read_struct_2+0x19f)[0xf695e16f]
/tmp/brULSGr1(png_create_read_struct+0x3e)[0xf695dfbe]
/usr/lib32/libfreetype.so.6(+0x51f4d)[0xf7079f4d]
Memory map:
00c00000-00c02000 r-xp 00000000 103:05 7341242 /usr/src/Quartus_13/components/QuartusSetupWeb-13.1.0.162.run
08048000-08157000 r-xp 00000000 00:00 0
08157000-0ab83000 rwxp 00000000 00:00 0 [heap]
309dd000-939b9000 r-xs 00000000 103:05 7341242 /usr/src/Quartus_13/components/QuartusSetupWeb-13.1.0.162.run
939b9000-941c7000 rwxp 00000000 00:00 0
941c7000-94233000 r-xp 00000000 103:05 12583791 /tmp/br0KRX3P (deleted)
94233000-94238000 rwxp 0006b000 103:05 12583791 /tmp/br0KRX3P (deleted)
94238000-94239000 rwxp 00000000 00:00 0
94239000-9424d000 r-xp 00000000 103:05 12583790 /tmp/brqV9dfA (deleted)
9424d000-9424e000 rwxp 00014000 103:05 12583790 /tmp/brqV9dfA (deleted)
f6214000-f6568000 r-xp 00000000 103:05 17566743 /usr/share/fonts/noto/NotoColorEmoji.ttf
f6568000-f6a46000 r-xp 00000000 103:05 12584012 /tmp/brULSGr1 (deleted)
f6a46000-f6a61000 rwxp 004de000 103:05 12584012 /tmp/brULSGr1 (deleted)
f6a61000-f6a67000 rwxp 00000000 00:00 0
f6a67000-f6e68000 rwxp 00000000 00:00 0
f6ea3000-f6ebd000 r-xp 00000000 103:05 18396660 /usr/lib64/gcc/x86_64-pc-linux-gnu/6.3.0/32/libgcc_s.so.1
f6ebd000-f6ebe000 r-xp 00019000 103:05 18396660 /usr/lib64/gcc/x86_64-pc-linux-gnu/6.3.0/32/libgcc_s.so.1
f6ebe000-f6ebf000 rwxp 0001a000 103:05 18396660 /usr/lib64/gcc/x86_64-pc-linux-gnu/6.3.0/32/libgcc_s.so.1
f6ebf000-f6ed2000 r-xs 00000000 103:05 17563817 /var/cache/fontconfig/8d4af663993b81a124ee82e610bb31f9-le32d4.cache-4
f6ed2000-f6ed8000 r-xs 00000000 103:05 17563806 /var/cache/fontconfig/ccb2d0786bada64fd4b4887a4949240d-le32d4.cache-4
f6ed8000-f6edc000 r-xs 00000000 103:05 17563805 /var/cache/fontconfig/a595ca43be94766bbfe429f07fba82d0-le32d4.cache-4
f6edc000-f6ede000 r-xs 00000000 103:05 17563804 /var/cache/fontconfig/452f1fac34b224105d7acfae3034bcd5-le32d4.cache-4
f6ede000-f6ee7000 r-xs 00000000 103:05 17563670 /var/cache/fontconfig/12b26b760a24f8b4feb03ad48a333a72-le32d4.cache-4
f6ee7000-f6eff000 r-xs 00000000 103:05 17563674 /var/cache/fontconfig/4b5cf4386f1cde02a336ba961b4ac82d-le32d4.cache-4
f6eff000-f6f05000 r-xs 00000000 103:05 17563673 /var/cache/fontconfig/d62e99ef547d1d24cdb1bd22ec1a2976-le32d4.cache-4
f6f05000-f6f09000 r-xs 00000000 103:05 17563662 /var/cache/fontconfig/f6b893a7224233d96cb72fd88691c0b4-le32d4.cache-4
f6f09000-f6f5d000 r-xs 00000000 103:05 17563667 /var/cache/fontconfig/17090aa38d5c6f09fb8c5c354938f1d7-le32d4.cache-4
f6f5d000-f6f64000 r-xp 00000000 103:05 17601726 /lib32/librt-2.23.so
f6f64000-f6f65000 r-xp 00006000 103:05 17601726 /lib32/librt-2.23.so
f6f65000-f6f66000 rwxp 00007000 103:05 17601726 /lib32/librt-2.23.so
f6f66000-f6f7f000 r-xp 00000000 103:05 17450566 /usr/lib32/libbsd.so.0.8.3
f6f7f000-f6f80000 r-xp 00018000 103:05 17450566 /usr/lib32/libbsd.so.0.8.3
f6f80000-f6f81000 rwxp 00019000 103:05 17450566 /usr/lib32/libbsd.so.0.8.3
f6f81000-f6fbd000 r-xp 00000000 103:05 17581113 /usr/lib32/libpng16.so.16.27.0
f6fbd000-f6fbe000 r-xp 0003b000 103:05 17581113 /usr/lib32/libpng16.so.16.27.0
f6fbe000-f6fbf000 rwxp 0003c000 103:05 17581113 /usr/lib32/libpng16.so.16.27.0
f6fbf000-f6fcf000 r-xp 00000000 103:05 17455653 /usr/lib32/libbz2.so.1.0.6
f6fcf000-f6fd0000 r-xp 0000f000 103:05 17455653 /usr/lib32/libbz2.so.1.0.6
f6fd0000-f6fd1000 rwxp 00010000 103:05 17455653 /usr/lib32/libbz2.so.1.0.6
f6fd1000-f6ff8000 r-xp 00000000 103:05 17475898 /usr/lib32/libexpat.so.1.6.2
f6ff8000-f6ffa000 r-xp 00026000 103:05 17475898 /usr/lib32/libexpat.so.1.6.2
f6ffa000-f6ffb000 rwxp 00028000 103:05 17475898 /usr/lib32/libexpat.so.1.6.2
f6ffb000-f7026000 r-xp 00000000 103:05 17480096 /usr/lib32/libxcb.so.1.1.0
f7026000-f7027000 r-xp 0002a000 103:05 17480096 /usr/lib32/libxcb.so.1.1.0
f7027000-f7028000 rwxp 0002b000 103:05 17480096 /usr/lib32/libxcb.so.1.1.0
f7028000-f70df000 r-xp 00000000 103:05 17582039 /usr/lib32/libfreetype.so.6.14.0
f70df000-f70e0000 ---p 000b7000 103:05 17582039 /usr/lib32/libfreetype.so.6.14.0
f70e0000-f70e4000 r-xp 000b7000 103:05 17582039 /usr/lib32/libfreetype.so.6.14.0
f70e4000-f70e5000 rwxp 000bb000 103:05 17582039 /usr/lib32/libfreetype.so.6.14.0
f70e5000-f7126000 r-xp 00000000 103:05 17452638 /usr/lib32/libfontconfig.so.1.8.0
f7126000-f7127000 ---p 00041000 103:05 17452638 /usr/lib32/libfontconfig.so.1.8.0
f7127000-f7128000 r-xp 00041000 103:05 17452638 /usr/lib32/libfontconfig.so.1.8.0
f7128000-f7129000 rwxp 00042000 103:05 17452638 /usr/lib32/libfontconfig.so.1.8.0
f7129000-f7141000 r-xp 00000000 103:05 17575364 /lib32/libpthread-2.23.so
f7141000-f7142000 r-xp 00017000 103:05 17575364 /lib32/libpthread-2.23.so
f7142000-f7143000 rwxp 00018000 103:05 17575364 /lib32/libpthread-2.23.so
f7143000-f7145000 rwxp 00000000 00:00 0
f7145000-f728e000 r-xp 00000000 103:05 17582051 /usr/lib32/libX11.so.6.3.0
f728e000-f728f000 r-xp 00148000 103:05 17582051 /usr/lib32/libX11.so.6.3.0
f728f000-f7292000 rwxp 00149000 103:05 17582051 /usr/lib32/libX11.so.6.3.0
f7293000-f7295000 r-xs 00000000 103:05 17563763 /var/cache/fontconfig/19fedb3e2210915f7a739b6fd7a52ad4-le32d4.cache-4
f7295000-f729c000 r-xs 00000000 103:05 17563671 /var/cache/fontconfig/f349e9996a5320f6dd491cedd2b1f964-le32d4.cache-4
f729c000-f72f0000 r-xs 00000000 103:05 17563663 /var/cache/fontconfig/df311e82a1a24c41a75c2c930223552e-le32d4.cache-4
f72f0000-f72fa000 r-xp 00000000 103:05 17606244 /lib32/libnss_files-2.23.so
f72fa000-f72fb000 r-xp 00009000 103:05 17606244 /lib32/libnss_files-2.23.so
f72fb000-f72fc000 rwxp 0000a000 103:05 17606244 /lib32/libnss_files-2.23.so
f72fc000-f7307000 r-xp 00000000 103:05 17606258 /lib32/libnss_nis-2.23.so
f7307000-f7308000 r-xp 0000a000 103:05 17606258 /lib32/libnss_nis-2.23.so
f7308000-f7309000 rwxp 0000b000 103:05 17606258 /lib32/libnss_nis-2.23.so
f7309000-f731f000 r-xp 00000000 103:05 17606253 /lib32/libnsl-2.23.so
f731f000-f7320000 r-xp 00015000 103:05 17606253 /lib32/libnsl-2.23.so
f7320000-f7321000 rwxp 00016000 103:05 17606253 /lib32/libnsl-2.23.so
f7321000-f7323000 rwxp 00000000 00:00 0
f7323000-f732a000 r-xp 00000000 103:05 17606261 /lib32/libnss_compat-2.23.so
f732a000-f732b000 r-xp 00006000 103:05 17606261 /lib32/libnss_compat-2.23.so
f732b000-f732c000 rwxp 00007000 103:05 17606261 /lib32/libnss_compat-2.23.so
f732c000-f750c000 r-xp 00000000 103:05 6423285 /usr/lib64/locale/locale-archive
f750c000-f750e000 rwxp 00000000 00:00 0
f750e000-f76b1000 r-xp 00000000 103:05 17606282 /lib32/libc-2.23.so
f76b1000-f76b2000 ---p 001a3000 103:05 17606282 /lib32/libc-2.23.so
f76b2000-f76b4000 r-xp 001a3000 103:05 17606282 /lib32/libc-2.23.so
f76b4000-f76b5000 rwxp 001a5000 103:05 17606282 /lib32/libc-2.23.so
f76b5000-f76b8000 rwxp 00000000 00:00 0
f76b8000-f76bb000 r-xp 00000000 103:05 17605487 /lib32/libdl-2.23.so
f76bb000-f76bc000 r-xp 00002000 103:05 17605487 /lib32/libdl-2.23.so
f76bc000-f76bd000 rwxp 00003000 103:05 17605487 /lib32/libdl-2.23.so
f76bd000-f770f000 r-xp 00000000 103:05 17601385 /lib32/libm-2.23.so
f770f000-f7710000 r-xp 00051000 103:05 17601385 /lib32/libm-2.23.so
f7710000-f7711000 rwxp 00052000 103:05 17601385 /lib32/libm-2.23.so
f7712000-f7717000 r-xp 00000000 103:05 17445085 /usr/lib32/libXdmcp.so.6.0.0
f7717000-f7718000 r-xp 00004000 103:05 17445085 /usr/lib32/libXdmcp.so.6.0.0
f7718000-f7719000 rwxp 00005000 103:05 17445085 /usr/lib32/libXdmcp.so.6.0.0
f7719000-f771c000 r-xp 00000000 103:05 17445061 /usr/lib32/libXau.so.6.0.0
f771c000-f771d000 r-xp 00002000 103:05 17445061 /usr/lib32/libXau.so.6.0.0
f771d000-f771e000 rwxp 00003000 103:05 17445061 /usr/lib32/libXau.so.6.0.0
f771e000-f7735000 r-xp 00000000 103:05 17581219 /usr/lib32/libz.so.1.2.11
f7735000-f7736000 r-xp 00016000 103:05 17581219 /usr/lib32/libz.so.1.2.11
f7736000-f7737000 rwxp 00017000 103:05 17581219 /usr/lib32/libz.so.1.2.11
f7737000-f774a000 r-xp 00000000 103:05 17449875 /usr/lib32/libXext.so.6.4.0
f774a000-f774b000 r-xp 00012000 103:05 17449875 /usr/lib32/libXext.so.6.4.0
f774b000-f774c000 rwxp 00013000 103:05 17449875 /usr/lib32/libXext.so.6.4.0
f774c000-f7756000 r-xp 00000000 103:05 17449053 /usr/lib32/libXrender.so.1.3.0
f7756000-f7757000 r-xp 00009000 103:05 17449053 /usr/lib32/libXrender.so.1.3.0
f7757000-f7758000 rwxp 0000a000 103:05 17449053 /usr/lib32/libXrender.so.1.3.0
f7758000-f7762000 r-xp 00000000 103:05 12583838 /tmp/broqf9aI (deleted)
f7762000-f7763000 rwxp 0000a000 103:05 12583838 /tmp/broqf9aI (deleted)
f7763000-f7769000 r-xp 00000000 103:05 12583837 /tmp/brylX13o (deleted)
f7769000-f776a000 rwxp 00005000 103:05 12583837 /tmp/brylX13o (deleted)
f776a000-f776e000 r-xp 00000000 103:05 12583784 /tmp/br2OMTF4 (deleted)
f776e000-f776f000 rwxp 00003000 103:05 12583784 /tmp/br2OMTF4 (deleted)
f776f000-f7772000 r-xp 00000000 103:05 17606208 /lib32/libSegFault.so
f7772000-f7773000 r-xp 00002000 103:05 17606208 /lib32/libSegFault.so
f7773000-f7774000 rwxp 00003000 103:05 17606208 /lib32/libSegFault.so
f7774000-f7775000 rwxp 00000000 00:00 0
f7775000-f7797000 r-xp 00000000 103:05 17606283 /lib32/ld-2.23.so
f7797000-f7798000 r-xp 00021000 103:05 17606283 /lib32/ld-2.23.so
f7798000-f7799000 rwxp 00022000 103:05 17606283 /lib32/ld-2.23.so
f7799000-f779b000 r--p 00000000 00:00 0 [vvar]
f779b000-f779c000 r-xp 00000000 00:00 0 [vdso]
ffba6000-ffbdc000 rwxp 00000000 00:00 0 [stack]
Segmentation fault |
_________________ Some day there will only be free software. |
|
Back to top |
|
|
RayDude Advocate
Joined: 29 May 2004 Posts: 2052 Location: San Jose, CA
|
Posted: Thu Jun 08, 2017 8:24 pm Post subject: |
|
|
The file output of the quartus install utility is:
Code: | file QuartusSetup-13.1.4.182.run
QuartusSetup-13.1.4.182.run: ELF 32-bit LSB executable, Intel 80386, version 1 (GNU/Linux), statically linked, stripped, with debug_info |
_________________ Some day there will only be free software. |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21489
|
Posted: Fri Jun 09, 2017 1:31 am Post subject: |
|
|
RayDude wrote: | I don't know why it complains it can't load the ELF, but then does so anyway. The crash seems to be coming from a glibc call from freetype. | It complains because you are running a shell script, which likely runs a mixture of 32-bit and 64-bit programs. The diagnostics are probably written when 64-bit helpers run before it gets to the point of running the QuartusSetupWeb installer. You could avoid these messages by running only the installer with this $LD_PRELOAD, not the helper script that runs the installer.
RayDude wrote: | Code: |
*** Segmentation fault
Backtrace:
/lib32/libc.so.6(__longjmp_chk+0x20)[0xf7602b00]
/usr/lib32/libfreetype.so.6(+0x5247e)[0xf707a47e]
/tmp/brULSGr1(png_error+0x61)[0xf6968931]
/tmp/brULSGr1(png_create_read_struct_2+0x19f)[0xf695e16f]
/tmp/brULSGr1(png_create_read_struct+0x3e)[0xf695dfbe]
/usr/lib32/libfreetype.so.6(+0x51f4d)[0xf7079f4d]
|
| You should probably use addr2line to decode the libfreetype lines. The execution of a program in /tmp looks very strange to me. That is extremely poor practice and really should not have worked at all. Is your /tmp not mounted noexec?
Based on the output so far, it looks like an anonymous temporary program tried to create a PNG format image, failed, and died badly while trying to handle/report the error. |
|
Back to top |
|
|
RayDude Advocate
Joined: 29 May 2004 Posts: 2052 Location: San Jose, CA
|
Posted: Fri Jun 09, 2017 6:58 pm Post subject: |
|
|
Thanks for replying Hu, I really appreciate it.
You are totally right about running the installer instead of the shell script. Thanks.
I don't have /tmp marked as non executable. Apparently the installer wouldn't work if I did, but I didn't even know that I should, so thanks for telling me about it.
The executable /tmp/brrmOp6N doesn't exist after the segfault so I don't know how to run addr2line on it.
Hu wrote: | RayDude wrote: | I don't know why it complains it can't load the ELF, but then does so anyway. The crash seems to be coming from a glibc call from freetype. | It complains because you are running a shell script, which likely runs a mixture of 32-bit and 64-bit programs. The diagnostics are probably written when 64-bit helpers run before it gets to the point of running the QuartusSetupWeb installer. You could avoid these messages by running only the installer with this $LD_PRELOAD, not the helper script that runs the installer.
RayDude wrote: | Code: |
*** Segmentation fault
Backtrace:
/lib32/libc.so.6(__longjmp_chk+0x20)[0xf7602b00]
/usr/lib32/libfreetype.so.6(+0x5247e)[0xf707a47e]
/tmp/brULSGr1(png_error+0x61)[0xf6968931]
/tmp/brULSGr1(png_create_read_struct_2+0x19f)[0xf695e16f]
/tmp/brULSGr1(png_create_read_struct+0x3e)[0xf695dfbe]
/usr/lib32/libfreetype.so.6(+0x51f4d)[0xf7079f4d]
|
| You should probably use addr2line to decode the libfreetype lines. The execution of a program in /tmp looks very strange to me. That is extremely poor practice and really should not have worked at all. Is your /tmp not mounted noexec?
Based on the output so far, it looks like an anonymous temporary program tried to create a PNG format image, failed, and died badly while trying to handle/report the error. |
_________________ Some day there will only be free software. |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21489
|
Posted: Fri Jun 09, 2017 11:48 pm Post subject: |
|
|
It appears they write it, run it, and delete it. You could try to find a way to capture a copy before it is deleted. You might be able to do this by using gdb to trace into the process, so that gdb stops the program when the signal is raised. However, I wanted you to use addr2line on freetype, not on the Quartus temporary file. Even so, I am doubtful that any information you capture will be useful even if this works. The problem appears to be some sort of incompatibility between their generated file's PNG functions and libfreetype.so.6. Without the ability to inspect it in more detail than is convenient for a proprietary program, your options are fairly limited. You could try to find what version of freetype was current back when this installer was new and test whether using that version allows it to proceed. |
|
Back to top |
|
|
Naib Watchman
Joined: 21 May 2004 Posts: 6051 Location: Removed by Neddy
|
|
Back to top |
|
|
RayDude Advocate
Joined: 29 May 2004 Posts: 2052 Location: San Jose, CA
|
Posted: Sat Jun 10, 2017 4:57 am Post subject: |
|
|
Thanks Naib. I'll try installing an old version of freetype on Monday. _________________ Some day there will only be free software. |
|
Back to top |
|
|
RayDude Advocate
Joined: 29 May 2004 Posts: 2052 Location: San Jose, CA
|
Posted: Mon Jun 12, 2017 10:22 pm Post subject: |
|
|
Thanks so much Naib!
I built the old freetype, installed it in /opt/lib32, changed the LD_LIBRARY:
Code: | export LD_LIBRARY_PATH=/opt/lib32 |
And Voila! It's installing as I type!
I really appreciate you taking the time to respond and help me out.
PS: What's even more amazing is, the Altera software itself runs without the special freetype library. It was only the installer (and based on the article modelsim) that need the old freetype. _________________ Some day there will only be free software. |
|
Back to top |
|
|
RayDude Advocate
Joined: 29 May 2004 Posts: 2052 Location: San Jose, CA
|
Posted: Thu Sep 08, 2022 5:50 pm Post subject: |
|
|
For when I have to do this again because I have to recompile my old FPGA yet again on yet another computer...
(This assumes gentoo is a multilib install)
As root:
wget https://sourceforge.net/projects/freetype/files/freetype2/2.4.12/freetype-2.4.12.tar.bz2/download
mv download freetype-2.4.12.tar.bz2
tar xf freetype-2.4.12.tar.bz2
cd freetype-2.4.12
env CFLAGS="-m32" ./configure
make
cp /usr/src/freetype-2.4.12/objs/.libs/lib* /usr/lib/.
As regular user Setup.sh should work now.
Note: unfortunately as of 9/8/22 Quartus II does not compile the FPGA design. The code hangs waiting for synthesis at 6% in 32 bit mode and at 1% in 64 bit mode. There are no errors or warnings. No messages in syslog or dmesg. _________________ Some day there will only be free software. |
|
Back to top |
|
|
|