Issue #6505 has been updated by nobu (Nobuyoshi Nakada).

Status changed from Assigned to Feedback

=begin
I cannot reproduce it with:

  $ uname -srvmo
  Linux 3.2.0-2-amd64 #1 SMP Mon May 21 17:45:41 UTC 2012 x86_64 GNU/Linux

  $ gcc-4.6 -v
  Using built-in specs.
  COLLECT_GCC=gcc-4.6
  COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper
  Target: x86_64-linux-gnu
  Configured with: ../src/configure -v --with-pkgversion='Debian 4.6.3-5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --with-arch-32=i586 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
  Thread model: posix
  gcc version 4.6.3 (Debian 4.6.3-5)

  $ configure -C CC=gcc-4.6 --enable-shared --prefix=/usr optflags='-fomit-frame-pointer -frerun-loop-opt' cflags=-pipe

How did you create ext/dl/callback.func file?

=end

----------------------------------------
Bug #6505: Can not compile ruby-1.8.7p358 from source
https://bugs.ruby-lang.org/issues/6505#change-26868

Author: shevegen (markus heiler)
Status: Feedback
Priority: Normal
Assignee: tenderlovemaking (Aaron Patterson)
Category: build
Target version: Ruby 1.8.7
ruby -v: 1.8.7p358


My system:

Linux

GCC Version:      GCC version 4.6.3 
Glibc Version:    ldd (GNU libc) 2.14.1
CFLAGS in use:    -fomit-frame-pointer -frerun-loop-opt -pipe -fPIC -pthread -O2
Binutils Version: GNU ld (GNU Binutils) 2.22


Configure option:

  only --prefix=/usr used.


make[1]: Entering director
gcc -I. -I../../.. -I../..VE_CONFIG_H -DHAVE_OPENSSLfomit-frame-pointer -freru
gcc -I. -I../../.. -I../..VE_CONFIG_H -DHAVE_OPENSSLfomit-frame-pointer -freru
gcc -shared -o ../../../.e -lpthread -rdynamic -Wl,-
make[1]: Leaving directory
compiling digest/sha2     
make[1]: Entering director
gcc -I. -I../../.. -I../../../. -I../../.././ext/digest/sha2 -I../../.././ext/digest/sha2/.. -DHAVE_CONFIG_H -DHAVE_SYS_CDEFS_H -DHAVE_INTTYPES_H -DHAVE_UNISTD_H -DHAVE_TYPE_UINT64_T    -fPIC  -fomit-frame-pointer -frerun-loop-opt -pipe -fPIC -pthread -O2    -c sha2.c
gcc -I. -I../../.. -I../../../. -I../../.././ext/digest/sha2 -I../../.././ext/digest/sha2/.. -DHAVE_CONFIG_H -DHAVE_SYS_CDEFS_H -DHAVE_INTTYPES_H -DHAVE_UNISTD_H -DHAVE_TYPE_UINT64_T    -fPIC  -fomit-frame-pointer -frerun-loop-opt -pipe -fPIC -pthread -O2    -c sha2init.c
gcc -shared -o ../../../.ext/x86_64-linux/digest/sha2.so sha2.o sha2init.o -L. -L../../.. -L. -lpthread -rdynamic -Wl,-export-dynamic    -lrt -ldl -lcrypt -lm   -lc
mkdir -p ../../../.ext/common/digest
cp ../../.././ext/digest/sha2/lib/sha2.rb ../../../.ext/common/digest
make[1]: Leaving directory `/Depot/jjj/ruby-1.8.7p358/ext/digest/sha2'
compiling dl
make[1]: Entering directory `/Depot/jjj/ruby-1.8.7p358/ext/dl'
gcc -I. -I../.. -I../../. -I../.././ext/dl -DHAVE_DLFCN_H -DHAVE_DLOPEN -DHAVE_DLCLOSE -DHAVE_DLSYM -DHAVE_DLERROR    -I. -fPIC  -fomit-frame-pointer -frerun-loop-opt -pipe -fPIC -pthread -O2   -fno-defer-pop -fno-omit-frame-pointer  -c ptr.c
Generating callback.func
Generating cbtable.func
gcc -I. -I../.. -I../../. -I../.././ext/dl -DHAVE_DLFCN_H -DHAVE_DLOPEN -DHAVE_DLCLOSE -DHAVE_DLSYM -DHAVE_DLERROR    -I. -fPIC  -fomit-frame-pointer -frerun-loop-opt -pipe -fPIC -pthread -O2   -fno-defer-pop -fno-omit-frame-pointer  -c dl.c
In file included from dl.c:104:0:
callback.func:1:1: warning: data definition has no type or storage class [enabled by default]
callback.func:1:7: error: expected identifier or ???(??? before ???long???
In file included from dl.c:104:0:
callback.func:78:33: error: expected ???)??? before ???(??? token
callback.func:79:3: warning: data definition has no type or storage class [enabled by default]
callback.func:79:24: error: ???proc??? undeclared here (not in a function)
callback.func:79:39: error: ???argc??? undeclared here (not in a function)
callback.func:79:45: error: ???argv??? undeclared here (not in a function)
callback.func:82:1: error: expected identifier or ???(??? before ???}??? token
dl.c:106:1: error: expected ???;???, ???,??? or ???)??? before ???static???
make[1]: *** [dl.o] Error 1
make[1]: Leaving directory `/Depot/jjj/ruby-1.8.7p358/ext/dl'
make: *** [all] Error 1






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