[#42344] [ruby-trunk - Feature #5964][Open] Make Symbols an Alternate Syntax for Strings — Tom Wardrop <tom@...>

23 messages 2012/02/03

[#42443] [ruby-trunk - Bug #5985][Open] miniruby skews "make benchmark" results — Eric Wong <normalperson@...>

21 messages 2012/02/08

[#42444] [ruby-trunk - Bug #5986][Open] Segmentation Fault — Luis Matta <levmatta@...>

16 messages 2012/02/08

[#42471] [ruby-trunk - Feature #5995][Open] calling io_advise_internal() in read_all() — Masaki Matsushita <glass.saga@...>

20 messages 2012/02/10

[#42560] [ruby-trunk - Bug #6011][Open] ruby-1.9.3-p0/lib/webrick/utils.rb:184: [BUG] Segmentation fault — Vit Ondruch <v.ondruch@...>

12 messages 2012/02/13

[#42579] [ruby-trunk - Bug #6012][Open] Proc#source_location also return the column — Roger Pack <rogerpack2005@...>

14 messages 2012/02/14

[#42685] [ruby-trunk - Bug #6036][Open] Test failures in Fedora Rawhide/17 — Bohuslav Kabrda <bkabrda@...>

14 messages 2012/02/16

[#42697] [ruby-trunk - Bug #6040][Open] Transcoding test failure: Big5 to UTF8 not defined (MinGW) — Luis Lavena <luislavena@...>

10 messages 2012/02/16

[#42813] [ruby-trunk - Feature #6065][Open] Allow Bignum marshalling/unmarshalling from C API — Martin Bosslet <Martin.Bosslet@...>

22 messages 2012/02/23

[#42815] [ruby-trunk - Bug #6066][Open] Fix "control may reach end of non-void function" warnings for clang — Eric Hodel <drbrain@...7.net>

15 messages 2012/02/23

[#42857] [ruby-trunk - Feature #6074][Open] Allow alias arguments to have a comma — Thomas Sawyer <transfire@...>

20 messages 2012/02/24

[#42891] [ruby-trunk - Feature #6083][Open] Hide a Bignum definition — Koichi Sasada <redmine@...>

23 messages 2012/02/25

[#42906] [ruby-trunk - Bug #6085][Open] Treatment of Wrong Number of Arguments — Marc-Andre Lafortune <ruby-core@...>

14 messages 2012/02/25

[#42949] [ruby-trunk - Bug #6089][Open] Test suite fails with OpenSSL 1.0.1 — Vit Ondruch <v.ondruch@...>

13 messages 2012/02/26

[ruby-core:42753] [ruby-trunk - Bug #5676][Closed] miniruby linking error: undefined reference to ___stack_chk_guard

From: Nobuyoshi Nakada <nobu@...>
Date: 2012-02-20 03:43:32 UTC
List: ruby-core #42753
Issue #5676 has been updated by Nobuyoshi Nakada.

Status changed from Feedback to Closed

Jon Forums wrote:
> I think you're right on runtime library mismatch, but shouldn't it fail when miniruby is used later in the build process, not at miniruby link time?

The mismatch between the compiler and the runtime library.  It can't
be deferred.

> 	475:-lssp.0 => /usr/local/lib/gcc46/libssp.so.0

Then -fstack-protector should let gcc link that library.

Try "gcc46 -dumpspecs | grep -A1 '^\*link_ssp:'", and if
%{fstack-protector:} does not exist or no options is given after the
colon, the spec is wrong.  And you will see same error with the
following simple code and -fstack-protector option, I guess:

  #include <stdlib.h>
  #include <stdio.h>
  int main() {printf("%p\n", alloca(102400)); return 0;}

If it's the case, this is primarily an issue of FreeBSD port.

> But shouldn't gcc46's default search dirs save the link like it appears to be happening when configure (using `--with-gcc=gcc46`) executes `RUBY_TRY_CFLAGS(-fstack-protector, ...)`?

It shouild be done in the spec file, as metioned above.

----------------------------------------
Bug #5676: miniruby linking error: undefined reference to ___stack_chk_guard
https://bugs.ruby-lang.org/issues/5676

Author: Martin D端rst
Status: Closed
Priority: Normal
Assignee: Motohiro KOSAKI
Category: build
Target version: 2.0.0
ruby -v: ruby 2.0.0dev (2011-11-27 trunk 33861) [i386-cygwin]


I get what I think is a linking error when linking miniruby.
Below is a (shortened) copy of the output I get. This is on
a clean checkout of trunk (using Ruby 1.8.7 as baseruby).

duerst@jougashima /cygdrive/c/Data/ruby-public
$ make
        CC = gcc
        LD = ld
        LDSHARED = gcc -shared -s
        CFLAGS = -O3 -g -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=implicit-function-declaration
        XCFLAGS = -include ruby/config.h -include ruby/missing.h -D_FORTIFY_SOURCE=2 -fstack-protector -DRUBY_EXPORT
        CPPFLAGS =   -I. -I.ext/include/i386-cygwin -I./include -I.
        DLDFLAGS = -Wl,--enable-auto-image-base,--enable-auto-import -Wl,--out-implib=libruby191.dll.a cygruby191.def -Xlinker --no-undefined
        SOLIBS = cygruby191.res.o -lpthread -lrt -ldl -lcrypt
linking miniruby.exe
dmyencoding.o: In function `set_encoding_const':
/cygdrive/c/Data/ruby-public/encoding.c:1473: undefined reference to `___stack_chk_guard'
/cygdrive/c/Data/ruby-public/encoding.c:1520: undefined reference to `___stack_chk_guard'
/cygdrive/c/Data/ruby-public/encoding.c:1520: undefined reference to `___stack_chk_fail'
bignum.o: In function `rb_str_to_inum':
/cygdrive/c/Data/ruby-public/bignum.c:763: undefined reference to `___stack_chk_guard'
/cygdrive/c/Data/ruby-public/bignum.c:790: undefined reference to `___stack_chk_guard'
/cygdrive/c/Data/ruby-public/bignum.c:790: undefined reference to `___stack_chk_fail'
dir.o: In function `dir_read':
/cygdrive/c/Data/ruby-public/dir.c:569: undefined reference to `___stack_chk_guard'
/cygdrive/c/Data/ruby-public/dir.c:586: undefined reference to `___stack_chk_guard'
/cygdrive/c/Data/ruby-public/dir.c:586: undefined reference to `___stack_chk_fail'

[... many more like these ...]

vm_dump.o: In function `control_frame_dump':
/cygdrive/c/Data/ruby-public/vm_dump.c:27: undefined reference to `___stack_chk_guard'
/cygdrive/c/Data/ruby-public/vm_dump.c:148: undefined reference to `___stack_chk_guard'
/cygdrive/c/Data/ruby-public/vm_dump.c:148: undefined reference to `___stack_chk_fail'
cont.o: In function `cont_restore_0':
/cygdrive/c/Data/ruby-public/cont.c:733: undefined reference to `___stack_chk_guard'
unicode.o: In function `onigenc_unicode_property_name_to_ctype':
/cygdrive/c/Data/ruby-public/./enc/unicode.c:2087: undefined reference to `___stack_chk_guard'
/cygdrive/c/Data/ruby-public/./enc/unicode.c:2114: undefined reference to `___stack_chk_guard'
/cygdrive/c/Data/ruby-public/./enc/unicode.c:2114: undefined reference to `___stack_chk_fail'
collect2: ld returned 1 exit status
make: *** [miniruby.exe] Error 1

duerst@jougashima /cygdrive/c/Data/ruby-public
$



-- 
http://bugs.ruby-lang.org/

In This Thread

Prev Next