Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 226063 - dev-lang/erlang fails to build with glibc 2.8
Summary: dev-lang/erlang fails to build with glibc 2.8
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Christian Faulhammer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: glibc-2.8
  Show dependency tree
 
Reported: 2008-06-12 13:15 UTC by Holger Hoffstätte
Modified: 2008-06-13 19:32 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
fix for build against glibc-2.8 (erlang-12.2.3-glibc28.patch,457 bytes, patch)
2008-06-12 13:24 UTC, Holger Hoffstätte
Details | Diff
Official patch as confirmed by upstream (erlang-12.2.3-glibc28.patch,431 bytes, patch)
2008-06-13 15:00 UTC, Holger Hoffstätte
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Holger Hoffstätte 2008-06-12 13:15:40 UTC
While trying to revbump erlang to 12.2.3 I encountered the following:

--snip--
i686-pc-linux-gnu-gcc  -pipe -march=pentium4 -mfpmath=sse -O3 -fomit-frame-pointer -I/var/tmp/portage/dev-lang/erlang-12.2.3/work/otp_src_R1
2B-3/erts/i686-pc-linux-gnu  -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -D_GNU_SOURCE -DERTS_SMP -DHAVE_CONFIG_H -Wall -Wstrict-prototypes 
-Wmissing-prototypes -Wdeclaration-after-statement -DUSE_THREADS -D_THREAD_SAFE -D_REENTRANT -D_POSIX_THREAD_SAFE_FUNCTIONS  -Ibeam -Isys/un
ix -Isys/common -Ii686-pc-linux-gnu/opt/smp -Ii686-pc-linux-gnu -Izlib -Ipcre -Ihipe -I../include/internal -I../include/internal/i686-pc-linux-gnu -c hipe/hipe_x86_signal.c -o obj/i686-pc-linux-gnu/opt/smp/hipe_x86_signal.o
hipe/hipe_x86_signal.c: In function 'my_sigaction':
hipe/hipe_x86_signal.c:221: warning: implicit declaration of function 'INIT'
hipe/hipe_x86_signal.c:231: warning: implicit declaration of function '__next_sigaction'

..then of course fails at link time:

i686-pc-linux-gnu-gcc -o /var/tmp/portage/dev-lang/erlang-12.2.3/work/otp_src_R12B-3/bin/i686-pc-linux-gnu/beam.smp \
         -Wl,-O1,--as-needed,-z,now  -Wl,-export-dynamic obj/i686-pc-linux-gnu/opt/smp/erl_main.o               obj/i686-pc-linux-gnu/opt/smp/preload.o obj/i686-pc-linux-gnu/opt/smp/erl_pbifs.o           obj/i686-pc-linux-gnu/opt/smp/benchmark.o obj/i686-pc-linux-gnu/opt/smp/erl_alloc.o         obj/i686-pc-linux-gnu/opt/smp/erl_mtrace.o obj/i686-pc-linux-gnu/opt/smp/erl_alloc_util.o       obj/i686-pc-linux-gnu/opt/smp/erl_goodfit_alloc.o obj/i686-pc-linux-gnu/opt/smp/erl_bestfit_alloc.o obj/i686-pc-linux-gnu/opt/smp/erl_afit_alloc.o obj/i686-pc-linux-gnu/opt/smp/erl_instrument.o       obj/i686-pc-linux-gnu/opt/smp/erl_init.o obj/i686-pc-linux-gnu/opt/smp/erl_atom_table.o obj/i686-pc-linux-gnu/opt/smp/erl_bif_table.o obj/i686-pc-linux-gnu/opt/smp/erl_bif_ddll.o          obj/i686-pc-linux-gnu/opt/smp/erl_bif_guard.o obj/i686-pc-linux-gnu/opt/smp/erl_bif_info.o  obj/i686-pc-linux-gnu/opt/smp/erl_bif_op.o obj/i686-pc-linux-gnu/opt/smp/erl_bif_os.o           obj/i686-pc-linux-gnu/opt/smp/erl_bif_lists.o obj/i686-pc-linux-gnu/opt/smp/erl_bif_trace.o obj/i686-pc-linux-gnu/opt/smp/erl_bif_wrap.o obj/i686-pc-linux-gnu/opt/smp/erl_trace.o              obj/i686-pc-linux-gnu/opt/smp/copy.o obj/i686-pc-linux-gnu/opt/smp/utils.o              obj/i686-pc-linux-gnu/opt/smp/bif.o obj/i686-pc-linux-gnu/opt/smp/io.o                      obj/i686-pc-linux-gnu/opt/smp/erl_printf_term.o obj/i686-pc-linux-gnu/opt/smp/erl_debug.o           obj/i686-pc-linux-gnu/opt/smp/erl_md5.o obj/i686-pc-linux-gnu/opt/smp/erl_message.o             obj/i686-pc-linux-gnu/opt/smp/erl_process.o obj/i686-pc-linux-gnu/opt/smp/erl_process_dict.o        obj/i686-pc-linux-gnu/opt/smp/erl_process_lock.o obj/i686-pc-linux-gnu/opt/smp/erl_port_task.o      obj/i686-pc-linux-gnu/opt/smp/erl_arith.o obj/i686-pc-linux-gnu/opt/smp/time.o     obj/i686-pc-linux-gnu/opt/smp/erl_time_sup.o obj/i686-pc-linux-gnu/opt/smp/external.o            obj/i686-pc-linux-gnu/opt/smp/dist.o obj/i686-pc-linux-gnu/opt/smp/binary.o         obj/i686-pc-linux-gnu/opt/smp/erl_db.o obj/i686-pc-linux-gnu/opt/smp/erl_db_util.o              obj/i686-pc-linux-gnu/opt/smp/erl_db_hash.o obj/i686-pc-linux-gnu/opt/smp/erl_db_tree.o             obj/i686-pc-linux-gnu/opt/smp/fix_alloc.o obj/i686-pc-linux-gnu/opt/smp/big.o                       obj/i686-pc-linux-gnu/opt/smp/hash.o obj/i686-pc-linux-gnu/opt/smp/index.o         obj/i686-pc-linux-gnu/opt/smp/atom.o obj/i686-pc-linux-gnu/opt/smp/module.o              obj/i686-pc-linux-gnu/opt/smp/export.o obj/i686-pc-linux-gnu/opt/smp/register.o             obj/i686-pc-linux-gnu/opt/smp/break.o obj/i686-pc-linux-gnu/opt/smp/erl_async.o         obj/i686-pc-linux-gnu/opt/smp/erl_lock_check.o obj/i686-pc-linux-gnu/opt/smp/erl_gc.o obj/i686-pc-linux-gnu/opt/smp/erl_nmgc.o              obj/i686-pc-linux-gnu/opt/smp/erl_posix_str.o obj/i686-pc-linux-gnu/opt/smp/erl_bits.o              obj/i686-pc-linux-gnu/opt/smp/erl_math.o obj/i686-pc-linux-gnu/opt/smp/erl_fun.o             obj/i686-pc-linux-gnu/opt/smp/erl_bif_port.o obj/i686-pc-linux-gnu/opt/smp/erl_term.o          obj/i686-pc-linux-gnu/opt/smp/erl_node_tables.o obj/i686-pc-linux-gnu/opt/smp/erl_monitors.o        obj/i686-pc-linux-gnu/opt/smp/erl_process_dump.o obj/i686-pc-linux-gnu/opt/smp/erl_obsolete.o       obj/i686-pc-linux-gnu/opt/smp/erl_bif_timer.o obj/i686-pc-linux-gnu/opt/smp/erl_drv_thread.o      obj/i686-pc-linux-gnu/opt/smp/erl_bif_chksum.o obj/i686-pc-linux-gnu/opt/smp/erl_bif_re.o obj/i686-pc-linux-gnu/opt/smp/beam_emu.o            obj/i686-pc-linux-gnu/opt/smp/beam_opcodes.o obj/i686-pc-linux-gnu/opt/smp/beam_load.o          obj/i686-pc-linux-gnu/opt/smp/beam_bif_load.o obj/i686-pc-linux-gnu/opt/smp/beam_debug.o            obj/i686-pc-linux-gnu/opt/smp/beam_bp.o obj/i686-pc-linux-gnu/opt/smp/beam_catches.o obj/i686-pc-linux-gnu/opt/smp/sys.o obj/i686-pc-linux-gnu/opt/smp/driver_tab.o obj/i686-pc-linux-gnu/opt/smp/unix_efile.o obj/i686-pc-linux-gnu/opt/smp/gzio.o obj/i686-pc-linux-gnu/opt/smp/elib_malloc.o obj/i686-pc-linux-gnu/opt/smp/elib_memmove.o obj/i686-pc-linux-gnu/opt/smp/sys_float.o obj/i686-pc-linux-gnu/opt/smp/sys_time.o obj/i686-pc-linux-gnu/opt/smp/erl_poll.kp.o obj/i686-pc-linux-gnu/opt/smp/erl_check_io.kp.o obj/i686-pc-linux-gnu/opt/smp/erl_poll.nkp.o obj/i686-pc-linux-gnu/opt/smp/erl_check_io.nkp.o obj/i686-pc-linux-gnu/opt/smp/erl_mseg.o obj/i686-pc-linux-gnu/opt/smp/erl_unix_sys_ddll.o obj/i686-pc-linux-gnu/opt/smp/erl_mtrace_sys_wrap.o obj/i686-pc-linux-gnu/opt/smp/hipe_bif0.o obj/i686-pc-linux-gnu/opt/smp/hipe_bif1.o obj/i686-pc-linux-gnu/opt/smp/hipe_bif2.o obj/i686-pc-linux-gnu/opt/smp/hipe_debug.o obj/i686-pc-linux-gnu/opt/smp/hipe_gc.o obj/i686-pc-linux-gnu/opt/smp/hipe_mode_switch.o obj/i686-pc-linux-gnu/opt/smp/hipe_native_bif.o obj/i686-pc-linux-gnu/opt/smp/hipe_stack.o obj/i686-pc-linux-gnu/opt/smp/hipe_x86.o obj/i686-pc-linux-gnu/opt/smp/hipe_x86_glue.o obj/i686-pc-linux-gnu/opt/smp/hipe_x86_bifs.o obj/i686-pc-linux-gnu/opt/smp/hipe_x86_signal.o obj/i686-pc-linux-gnu/opt/smp/hipe_x86_stack.o  obj/i686-pc-linux-gnu/opt/smp/efile_drv.o obj/i686-pc-linux-gnu/opt/smp/inet_drv.o obj/i686-pc-linux-gnu/opt/smp/zlib_drv.o obj/i686-pc-linux-gnu/opt/smp/ram_file_drv.o obj/i686-pc-linux-gnu/opt/smp/ttsl_drv.o -lutil -ldl -lm   -lncurses -L../lib/internal/i686-pc-linux-gnu /var/tmp/portage/dev-lang/erlang-12.2.3/work/otp_src_R12B-3/erts/obj/i686-pc-linux-gnu/libz.a /var/tmp/portage/dev-lang/erlang-12.2.3/work/otp_src_R12B-3/erts/emulator/obj/i686-pc-linux-gnu/opt/libepcre.a -lethread -lpthread -lerts_internal_r -lrt
obj/i686-pc-linux-gnu/opt/smp/hipe_x86_signal.o: In function `sigaction':
hipe_x86_signal.c:(.text+0xa9): undefined reference to `INIT'
hipe_x86_signal.c:(.text+0xff): undefined reference to `__next_sigaction'
obj/i686-pc-linux-gnu/opt/smp/hipe_x86_signal.o: In function `hipe_signal_init':
hipe_x86_signal.c:(.text+0x118): undefined reference to `INIT'
hipe_x86_signal.c:(.text+0x148): undefined reference to `INIT'
hipe_x86_signal.c:(.text+0x163): undefined reference to `__next_sigaction'
hipe_x86_signal.c:(.text+0x190): undefined reference to `INIT'
hipe_x86_signal.c:(.text+0x1d9): undefined reference to `__next_sigaction'
collect2: ld returned 1 exit status

--snip--

From a quick look at the source of hipe_x86_signal.c it seems
that the glibc version checks miss defining/overriding the correct INIT
and __sigaction signal handler stuff. This also happens with 12.2.2 (just verified), so it is not a new problem in 12.2.3. I am building with a patch (1-liner) as we speak.


Reproducible: Always

Steps to Reproduce:
1. emerge glibc-2.8
2. emerge erlang
3. fail!
Comment 1 Holger Hoffstätte 2008-06-12 13:24:26 UTC
Created attachment 156491 [details, diff]
fix for build against glibc-2.8

This is just a quick attempt, but it did the trick; build succeeds and works. Not happy with the fixed version numbers, as glibc 2.9 will likely hit the same problem.
Comment 2 Holger Hoffstätte 2008-06-12 13:25:52 UTC
I have also posted this to the erlang.bugs list; we'll see what the official recommendation is.
Comment 3 Christian Faulhammer (RETIRED) gentoo-dev 2008-06-12 13:57:06 UTC
(In reply to comment #2)
> I have also posted this to the erlang.bugs list; we'll see what the official
> recommendation is.

 I will not apply the patch yet as I have the same uneasy feeling about it.
By the way, I haven't seen a mail from you on the erlang-bugs mailing list.

Comment 4 Holger Hoffstätte 2008-06-12 14:04:43 UTC
I read many lists via gmane and apparently postings to the erlang lists are eaten..which would explain why nobody ever answered my questions. :(
Will try nabble..
Comment 5 Christian Faulhammer (RETIRED) gentoo-dev 2008-06-12 14:07:34 UTC
(In reply to comment #4)
> I read many lists via gmane and apparently postings to the erlang lists are
> eaten..which would explain why nobody ever answered my questions. :(

 Give me the text and I will post it for you.

Comment 6 Holger Hoffstätte 2008-06-12 14:15:35 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > I read many lists via gmane and apparently postings to the erlang lists are
> > eaten..which would explain why nobody ever answered my questions. :(
> 
>  Give me the text and I will post it for you.

Much appreciated but I guess sooner or later I'll have to subscribe anyway, so that's what I just did (maybe they authorize gmane and subscribers). Jeez..I've been using email since '91 and this just keeps getting worse..
Comment 7 Christian Faulhammer (RETIRED) gentoo-dev 2008-06-12 14:41:16 UTC
Will commit 12B-3 soon, please test if that succeeds with glibc 2.8 even though it is not mentioned in the ChangeLog in any way.
Comment 8 Holger Hoffstätte 2008-06-12 19:07:31 UTC
(In reply to comment #7)
> Will commit 12B-3 soon, please test if that succeeds with glibc 2.8 even though
> it is not mentioned in the ChangeLog in any way.

I see it in portage but how would it suceed if the patch is not there?
Comment 9 Christian Faulhammer (RETIRED) gentoo-dev 2008-06-13 06:41:35 UTC
(In reply to comment #8)
> (In reply to comment #7)
> > Will commit 12B-3 soon, please test if that succeeds with glibc 2.8 even though
> > it is not mentioned in the ChangeLog in any way.
> 
> I see it in portage but how would it suceed if the patch is not there?

 Maybe it was fixed by upstream, so unlikely...I did not add the patch as I will wait for a reaction of the Erlang upstream.
Comment 10 Holger Hoffstätte 2008-06-13 14:54:15 UTC
Upstream response:
http://www.nabble.com/forum/ViewPost.jtp?post=17820804&framed=y

As I suspected we can remove the minor version check for glibc; I'll update the patch asap.
Comment 11 Holger Hoffstätte 2008-06-13 15:00:11 UTC
Created attachment 156639 [details, diff]
Official patch as confirmed by upstream
Comment 12 Christian Faulhammer (RETIRED) gentoo-dev 2008-06-13 19:32:01 UTC
Fixed, thanks.