From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: "Alexis Lothoré" <alexis.lothore@bootlin.com>
Cc: buildroot@buildroot.org, Will Newton <will.newton@gmail.com>
Subject: Re: [Buildroot] [PATCH] package/erlang: fix link failure on odbcserver
Date: Sat, 29 Aug 2026 23:09:45 +0200 [thread overview]
Message-ID: <apNKif-4jB4g8g0l@windsurf> (raw)
In-Reply-To: <20260823-fix-host-erlang-v1-1-4886b00d10f0@bootlin.com>
On Sun, Aug 23, 2026 at 11:49:38PM +0200, Alexis Lothoré via buildroot wrote:
> host-erlang build can fail with the following error:
>
> make[5]: Nothing to be done for 'opt'.
> MAKE opt
> CC ../priv/bin/x86_64-pc-linux-gnu/odbcserver
> /usr/bin/ld: ../priv/obj/x86_64-pc-linux-gnu/odbcserver.o: in function `encode_column_dyn':
> odbcserver.c:(.text+0x6b4): undefined reference to `ei_x_encode_tuple_header'
> /usr/bin/ld: odbcserver.c:(.text+0x6c2): undefined reference to `ei_x_encode_tuple_header'
> /usr/bin/ld: odbcserver.c:(.text+0x6d4): undefined reference to `ei_x_encode_ulong'
> /usr/bin/ld: odbcserver.c:(.text+0x6e7): undefined reference to `ei_x_encode_ulong'
> /usr/bin/ld: odbcserver.c:(.text+0x6fa): undefined reference to `ei_x_encode_ulong'
> /usr/bin/ld: odbcserver.c:(.text+0x708): undefined reference to `ei_x_encode_tuple_header'
> /usr/bin/ld: odbcserver.c:(.text+0x71b): undefined reference to `ei_x_encode_ulong'
> /usr/bin/ld: odbcserver.c:(.text+0x72e): undefined reference to `ei_x_encode_ulong'
> [...]
>
> This can be reproduced with the following minimal defconfig (and
> libei.so present on host, see details below):
>
> BR2_x86_64=y
> BR2_TOOLCHAIN_EXTERNAL=y
> BR2_PACKAGE_ERLANG=y
>
> Those missing symbols are part of the erl_interface, exposed by libei.a.
> host-erlang builds correctly libei.a _before_ odbcserver.c (it can be
> found in lib/erl_interface/obj/x86_64-pc-linux-gnu/libei.a), but the
> failure is actually due to the build command generated and used for
> odbcserver.c, especially the link arguments:
>
> /usr/bin/gcc \
> [...]
> -o ../priv/bin/x86_64-pc-linux-gnu/odbcserver \
> ../priv/obj/x86_64-pc-linux-gnu/odbcserver.o \
> -L/usr/lib64 \
> -lodbc \
> -L/home/alexis/src/buildroot/erlang-master/build/host-erlang-custom/lib/erl_interface/obj/x86_64-pc-linux-gnu \
> -lpthread -lei
>
> /usr/lib64 is searched before the path where libei.a has been built, so
> if whether a valid libei.a or libei.so is found there, it shadows the
> expected libei.a. In the build from which the logs above come, the
> notable point is that the host system indeed have a valid libei.so, but
> is completely unrelated to erl_interface; it rather exposes the Emulated
> Input protocol aimed at Wayland stack; and so it obviously contains none
> of the expected ei_* symbols.
>
> Upstream has already identified and fixed the issue, the fix is already
> released in versions >= 27.x.y. Erlang 26 (the version currently
> packaged in buildroot), isn't supported anymore (only the three latest
> releases are supported, see
> https://github.com/erlang/otp/blob/master/SECURITY.md), so there won't
> be any new minor update that will release this fix.
>
> Pick and backport the fixing patch so that the current version packaged
> in buildroot can still build.
>
> Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Applied to next, thanks!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2026-08-29 21:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-23 21:49 [Buildroot] [PATCH] package/erlang: fix link failure on odbcserver Alexis Lothoré via buildroot
2026-08-29 21:09 ` Thomas Petazzoni via buildroot [this message]
2026-08-29 21:10 ` Thomas Petazzoni via buildroot
2026-09-04 12:18 ` Thomas Perale via buildroot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=apNKif-4jB4g8g0l@windsurf \
--to=buildroot@buildroot.org \
--cc=alexis.lothore@bootlin.com \
--cc=thomas.petazzoni@bootlin.com \
--cc=will.newton@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.