Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 31 Jan 2014 16:40:38 +0100
From: John Spencer <maillist-owl@...fooze.de>
To:  owl-users@...ts.openwall.com
CC:  dalias@...ifal.cx
Subject: Re: gcc-related bug?

croco@...nwall.com wrote:
> Colleagues,
> 
> 
> I'm trying to build Ruby under Owl, and I've got the following:
> 
> linking miniruby
> gcc -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter
> -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers
> -Wunused-variable -Wpointer-arith -Wwrite-strings
> -Wdeclaration-after-statement -Wimplicit-function-declaration -ansi
> -std=iso9899:199409  -L. -fstack-protector -rdynamic -Wl,-export-dynamic
> -fstack-protector -pie  main.o dmydln.o miniinit.o miniprelude.o array.o
> bignum.o class.o compar.o complex.o dir.o dln_find.o encoding.o enum.o
> enumerator.o error.o eval.o load.o proc.o file.o gc.o hash.o inits.o io.o
> marshal.o math.o node.o numeric.o object.o pack.o parse.o process.o
> random.o range.o rational.o re.o regcomp.o regenc.o regerror.o regexec.o
> regparse.o regsyntax.o ruby.o safe.o signal.o sprintf.o st.o strftime.o
> string.o struct.o time.o transcode.o util.o variable.o version.o compile.o
> debug.o iseq.o vm.o vm_dump.o vm_backtrace.o vm_trace.o thread.o cont.o
> ascii.o us_ascii.o unicode.o utf_8.o newline.o setproctitle.o addr2line.o
> dmyext.o   -lpthread -lrt -lgmp -ldl -lcrypt -lm   -o miniruby
> /usr/lib/gcc/i686-openwall-linux/4.6.3/../../../libssp.a(ssp.o): In

Afaik glibc should already come with its own libssp, so having it in gcc 
as well is redundant (there's a configure flag for that, which should be 
set automatically when using glibc, but it can be overridden like this:
gcc_cv_libc_provides_ssp=yes make ... when building gcc).
Your issue comes from -pie tho which pulls in __stack_chk_fail_local 
(and that one should be only in libssp_nonshared.a).
so it seems your gcc was incorrectly configured.
maybe Rich (CC'ed) knows more details ?

either way, removing -pie from the CFLAGS should work around the issue.

> function `__stack_chk_fail_local':
> (.text+0x170): multiple definition of `__stack_chk_fail_local'
> /usr/lib/gcc/i686-openwall-linux/4.6.3/../../../libssp_nonshared.a(libssp_nonshared_la-ssp-local.o):(.text+0x0):
> first defined here
> collect2: ld returned 1 exit status
> make: *** [miniruby] Error 1
> 
> 
> 
> This seems to be a long-known bug somehow related to gcc, see, for
> example, here: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35377 -- but
> here the 4.2.3 is discussed, while I'm using 4.6.3 (which is in Owl), so
> perhaps replacing gcc with another version will not solve the problem.
> 
> Any ideas?  May be someone has prebuild packages of Ruby for Owl?
> 
> 
> --
> Croco
> 

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.