Opened 8 years ago

Closed 4 years ago

Last modified 4 years ago

#12791 closed bug (fixed)

GCC 5.3.0 libssp problem -- broken stack protector

Reported by: kallisti5 Owned by: nobody
Priority: normal Milestone: R1/beta2
Component: System/runtime_loader Version: R1/Development
Keywords: gcc libssp Cc:
Blocked By: Blocking:
Platform: All

Description

Potentially related to #6661

Attempting to compile Ruby results in "cannot determine size of long long"

A little digging through the logs shows:

gcc -o conftest -O3 -fno-fast-math -ggdb3 -std=iso9899:1999 -fstack-protector conftest.c

executing said 'conftest' results in:

runtime_loader: Cannot open file libssp.so.0: No such file or directory

A quick test.c with a minimal main shows that the -fstack-protector flag triggers the error. Any binary compiled with -fstack-protector ends up missing libssp.so.0

As this is a issue with our compiler that will likely break quite a few ports in a "hard to fix later" way, i'm flagging this as a blocker.

Change History (9)

comment:1 by kallisti5, 8 years ago

seen on x86_64 hrev50321

comment:2 by kallisti5, 8 years ago

maybe libssp.so.0 is missing from the recipe? I don't see a reason we shouldn't continue with the shared version.

https://github.com/haikuports/haikuports/blob/master/sys-devel/gcc/gcc-5.3.0_2016_02_29.recipe#L184

Is that the right recipe? No idea. Out of time for now.

comment:3 by pulkomandy, 8 years ago

The stack protection needs OS specific support and as far as I know it was not ported to Haiku yet. Ruby configure script should check wether the flag actually works, before using it.

It would be a good idea to add support for it in Haiku, but a bit more work. We can start by enabling --enable-libssp in gcc configure script and see what happens.

comment:4 by korli, 8 years ago

Owner: changed from nobody to korli
Priority: blockernormal
Status: newassigned

There doesn't seem to be many ports hardcoding this flag, unsetting blocker priority.

comment:5 by waddlesplash, 8 years ago

Milestone: R1/beta1Unscheduled

And bumping to unscheduled; if nobody uses this, it's not important.

comment:7 by korli, 8 years ago

Owner: changed from korli to nobody

comment:8 by pulkomandy, 4 years ago

Resolution: fixed
Status: assignedclosed

gcc packaging was fixed to include the lib.

comment:9 by nielx, 4 years ago

Milestone: UnscheduledR1/beta2

Assign tickets with status=closed and resolution=fixed within the R1/beta2 development window to the R1/beta2 Milestone

Note: See TracTickets for help on using tickets.