All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] dmalloc issue on ARC HS38
@ 2020-08-08 15:55 Thomas Petazzoni
  2020-08-11 20:00 ` [Buildroot] [arc-buildroot] " Evgeniy Didin
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Petazzoni @ 2020-08-08 15:55 UTC (permalink / raw)
  To: buildroot

Dear ARC maintainers,

For quite a while, we have been having this build issue of the dmalloc
package on ARC HS38:

  http://autobuild.buildroot.net/?reason=dmalloc-5.5.2

It goes like this:

ERROR: architecture for "/usr/lib/libdmallocxx.so" is "ARCompact", should be "ARCv2"
ERROR: architecture for "/usr/lib/libdmalloc.so" is "ARCompact", should be "ARCv2"
ERROR: architecture for "/usr/lib/libdmallocth.so" is "ARCompact", should be "ARCv2"
ERROR: architecture for "/usr/lib/libdmallocthcxx.so" is "ARCompact", should be "ARCv2"

According to arch/Config.in.arc, we expect that the ELF type of
binaries should be:

        default "ARCompact"     if BR2_arc750d || BR2_arc770d
        default "ARCv2"         if BR2_archs38 || BR2_archs38_64mpy || BR2_archs38_full || BR2_archs4x_rel31

So for HS38, it should be ARCv2, but for some reason, just for this
package, the value is ARCompact. Why so? I don't see any special flag
passed by dmalloc at build time.

Also, another thing that looks suspicious in the build log is:

checking shared library link args... ./configure: line 4467: 15012 Segmentation fault      ( ${LD-ld} -shared --whole-archive -soname conftest.so -o conftest.so.t conftest.a ) 2>&5
/usr/lfs/hdd_v1/rc-buildroot-test/scripts/instance-0/output-1/host/bin/arc-buildroot-linux-gnu-ld -G -o $@.t

It looks like an ARC linker segmentation fault. It might actually be
related, because when I look at how the .so files are produced:

/usr/lfs/hdd_v1/rc-buildroot-test/scripts/instance-0/output-1/host/bin/arc-buildroot-linux-gnu-ld -G -o libdmalloc.so.t libdmalloc.a
/usr/lfs/hdd_v1/rc-buildroot-test/scripts/instance-0/output-1/host/bin/arc-buildroot-linux-gnu-ld -G -o libdmallocxx.so.t libdmallocxx.a

it calls ld directly, which is probably why it is producing a .so file
with the incorrect ELF type.

Could you have a look into this ?

Thanks a lot,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Buildroot] [arc-buildroot] dmalloc issue on ARC HS38
  2020-08-08 15:55 [Buildroot] dmalloc issue on ARC HS38 Thomas Petazzoni
@ 2020-08-11 20:00 ` Evgeniy Didin
  0 siblings, 0 replies; 2+ messages in thread
From: Evgeniy Didin @ 2020-08-11 20:00 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

I am currently investigating this issue as well as other ARC-related(arc-gdb, apcupsd, etc.).
I will send fixes as soon as possible.

Best regards,
Evgeniy Didin

-----Original Message-----
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com> 
Sent: Saturday, August 8, 2020 6:56 PM
To: ARC Maintainers <arc-buildroot@synopsys.com>
Cc: buildroot at uclibc.org
Subject: [arc-buildroot] dmalloc issue on ARC HS38

Dear ARC maintainers,

For quite a while, we have been having this build issue of the dmalloc package on ARC HS38:

  https://urldefense.com/v3/__http://autobuild.buildroot.net/?reason=dmalloc-5.5.2__;!!A4F2R9G_pg!PoHjeFRllJw9Z-29IUdLH6tjFiBZST81gzh5LZPolssbfs48opcYULUQ4zAlLGTJCol5Lg$ 

It goes like this:

ERROR: architecture for "/usr/lib/libdmallocxx.so" is "ARCompact", should be "ARCv2"
ERROR: architecture for "/usr/lib/libdmalloc.so" is "ARCompact", should be "ARCv2"
ERROR: architecture for "/usr/lib/libdmallocth.so" is "ARCompact", should be "ARCv2"
ERROR: architecture for "/usr/lib/libdmallocthcxx.so" is "ARCompact", should be "ARCv2"

According to arch/Config.in.arc, we expect that the ELF type of binaries should be:

        default "ARCompact"     if BR2_arc750d || BR2_arc770d
        default "ARCv2"         if BR2_archs38 || BR2_archs38_64mpy || BR2_archs38_full || BR2_archs4x_rel31

So for HS38, it should be ARCv2, but for some reason, just for this package, the value is ARCompact. Why so? I don't see any special flag passed by dmalloc at build time.

Also, another thing that looks suspicious in the build log is:

checking shared library link args... ./configure: line 4467: 15012 Segmentation fault      ( ${LD-ld} -shared --whole-archive -soname conftest.so -o conftest.so.t conftest.a ) 2>&5
/usr/lfs/hdd_v1/rc-buildroot-test/scripts/instance-0/output-1/host/bin/arc-buildroot-linux-gnu-ld -G -o $@.t

It looks like an ARC linker segmentation fault. It might actually be related, because when I look at how the .so files are produced:

/usr/lfs/hdd_v1/rc-buildroot-test/scripts/instance-0/output-1/host/bin/arc-buildroot-linux-gnu-ld -G -o libdmalloc.so.t libdmalloc.a /usr/lfs/hdd_v1/rc-buildroot-test/scripts/instance-0/output-1/host/bin/arc-buildroot-linux-gnu-ld -G -o libdmallocxx.so.t libdmallocxx.a

it calls ld directly, which is probably why it is producing a .so file with the incorrect ELF type.

Could you have a look into this ?

Thanks a lot,

Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://urldefense.com/v3/__https://bootlin.com__;!!A4F2R9G_pg!PoHjeFRllJw9Z-29IUdLH6tjFiBZST81gzh5LZPolssbfs48opcYULUQ4zAlLGRuGFwNaQ$ 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-08-11 20:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-08 15:55 [Buildroot] dmalloc issue on ARC HS38 Thomas Petazzoni
2020-08-11 20:00 ` [Buildroot] [arc-buildroot] " Evgeniy Didin

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.