Skip to main content
AShva.1
Associate III
March 31, 2020
Question

Error: Inconsistency detected by ld.so: dl-lookup.c:

  • March 31, 2020
  • 8 replies
  • 2237 views

I downloaded, installed and configured Eclipse, Version: 2020-03 (4.15.0), UBUNTU 16.04 LTS

Wrote a simple program:

#include <stdio.h>

#include <stdlib.h>

int main(void)

{

   printf( "Hello world\n" );

   return 1;

}

compiles without errors :)

But, when I run on the board, it gives an error:

Inconsistency detected by ld.so: dl-lookup.c: 948: _dl_setup_hash: Assertion `(bitmask_nwords & (bitmask_nwords - 1)) == 0' failed!

if I compile this program, as shown in the example in the Wiki "Create a simple hello-world application", then everything works fine.

i think something with eclipse settings.

Did anyone have this?

Sincerely, Alexander

This topic has been closed for replies.

8 replies

mleo
Visitor II
March 31, 2020

Hello Alexander,

I'm sorry - in my previous reply I didn't provide correct info.

By mistake I copied settings from another project.

Try following linker settings in Miscellaneous -> Linker flags

-mfloat-abi=hard -mtune=cortex-a7 --sysroot=/home/osboxes/STM32MPU_workspace/STM32MP15-Ecosystem-v1.2.0/Developer-Package/SDK/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi

Let me know if it works now

BR,

Milan

AShva.1
AShva.1Author
Associate III
April 1, 2020

Hello Milan!

thanks for the answer

I tried with new linker flags.

Unfortunately, the same error again :(

maybe it's because i use STM32MP15-Ecosystem-v1.1.0 ?

best regards

Alexander

mleo
Visitor II
April 1, 2020

Hello Alexander,

I use 1.2.0 but I don't think it's the real issue.

Could you provide result of comp / linker?

BR,

Milan

AShva.1
AShva.1Author
Associate III
April 1, 2020

Hello Milan!

I downloaded and installed on a PC "Ecosystem-v1.2.0"

nothing changed :(

Unfortunately, the same error again :(

file 222, the executable file in the attachment

best regards

Alexander

AShva.1
AShva.1Author
Associate III
April 3, 2020

Hello Milan!

I found that the object file 222.o is working correctly

if you run it on the DK2 board, it works fine :)

I think the linker is not working properly

setting for compiler: -I/home/alexsander/STM32MPU_workspace/STM32MP15-Ecosystem-v1.2.0/Developer-Package/SDK/sysroots/x86_64-ostl_sdk-linux/usr/include -O0 -g3 -Wall --sysroot=/home/alexsander/STM32MPU_workspace/STM32MP15-Ecosystem-v1.2.0/Developer-Package/SDK/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi -march=armv7ve -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7

setting for linker: -nostartfiles --sysroot=/home/alexsander/STM32MPU_workspace/STM32MP15-Ecosystem-v1.2.0/Developer-Package/SDK/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi -mfloat-abi=hard -mtune=cortex-a7

in the attachment, the object file 222.о

I renamed it 222

may need to change linker settings?

best regards

Alexander

mleo
Visitor II
April 7, 2020

Hello Alexander,

In you first sentence you write that the result in working fine on DK2.

I guess you can execute it on the board.

If this si right, what's the issue with linker?

Best regards,

Milan

AShva.1
AShva.1Author
Associate III
April 7, 2020

Hello Milan!

i think you're right

linker is not working properly

i don't know how to fix it :(

best regards

Alexander

mleo
Visitor II
April 8, 2020

Hi Alexander,

sorry for misunderstanding, but on my side both link and compiler work properly.

Could you send log of compiler and linker?

make all 

Building file: /home/osboxes/STM32MP15-Ecosystem-v1.2.0/Developer-Package/stm32mp1-openstlinux-20-02-19/sources/gtk_hello_world_example/gtk_hello_world.c

Invoking: Cross GCC Compiler

arm-ostl-linux-gnueabi-gcc -march=armv7ve -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 -I/home/osboxes/STM32MPU_workspace/STM32MP15-Ecosystem-v1.2.0/Developer-Package/SDK/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/usr/include/gtk-3.0/ -I/home/osboxes/STM32MPU_workspace/STM32MP15-Ecosystem-v1.2.0/Developer-Package/SDK/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/usr/lib/glib-2.0/include/ -I/home/osboxes/STM32MPU_workspace/STM32MP15-Ecosystem-v1.2.0/Developer-Package/SDK/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/usr/include/glib-2.0/ -I/home/osboxes/STM32MPU_workspace/STM32MP15-Ecosystem-v1.2.0/Developer-Package/SDK/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/usr/include/glib-2.0/ -I/home/osboxes/STM32MPU_workspace/STM32MP15-Ecosystem-v1.2.0/Developer-Package/SDK/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/usr/include/at-spi2-atk/2.0 -I/home/osboxes/STM32MPU_workspace/STM32MP15-Ecosystem-v1.2.0/Developer-Package/SDK/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/usr/include/at-spi-2.0 -I/home/osboxes/STM32MPU_workspace/STM32MP15-Ecosystem-v1.2.0/Developer-Package/SDK/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/usr/include/dbus-1.0 -I/home/osboxes/STM32MPU_workspace/STM32MP15-Ecosystem-v1.2.0/Developer-Package/SDK/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/usr/lib/dbus-1.0/include -I/home/osboxes/STM32MPU_workspace/STM32MP15-Ecosystem-v1.2.0/Developer-Package/SDK/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/usr/include/gio-unix-2.0/ -I/home/osboxes/STM32MPU_workspace/STM32MP15-Ecosystem-v1.2.0/Developer-Package/SDK/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/usr/include/cairo -I/home/osboxes/STM32MPU_workspace/STM32MP15-Ecosystem-v1.2.0/Developer-Package/SDK/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/usr/include/libdrm -I/home/osboxes/STM32MPU_workspace/STM32MP15-Ecosystem-v1.2.0/Developer-Package/SDK/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/usr/include/pango-1.0 -I/home/osboxes/STM32MPU_workspace/STM32MP15-Ecosystem-v1.2.0/Developer-Package/SDK/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/usr/include/harfbuzz -I/home/osboxes/STM32MPU_workspace/STM32MP15-Ecosystem-v1.2.0/Developer-Package/SDK/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/usr/include/pango-1.0 -I/home/osboxes/STM32MPU_workspace/STM32MP15-Ecosystem-v1.2.0/Developer-Package/SDK/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/usr/include/fribidi -I/home/osboxes/STM32MPU_workspace/STM32MP15-Ecosystem-v1.2.0/Developer-Package/SDK/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/usr/include/atk-1.0 -I/home/osboxes/STM32MPU_workspace/STM32MP15-Ecosystem-v1.2.0/Developer-Package/SDK/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/usr/include/cairo -I/home/osboxes/STM32MPU_workspace/STM32MP15-Ecosystem-v1.2.0/Developer-Package/SDK/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/usr/include/pixman-1 -I/home/osboxes/STM32MPU_workspace/STM32MP15-Ecosystem-v1.2.0/Developer-Package/SDK/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/usr/include/freetype2 -I/home/osboxes/STM32MPU_workspace/STM32MP15-Ecosystem-v1.2.0/Developer-Package/SDK/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/usr/include/libpng16 -I/home/osboxes/STM32MPU_workspace/STM32MP15-Ecosystem-v1.2.0/Developer-Package/SDK/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/usr/include/gdk-pixbuf-2.0 -I/home/osboxes/STM32MPU_workspace/STM32MP15-Ecosystem-v1.2.0/Developer-Package/SDK/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/usr/include/libpng16 -I/home/osboxes/STM32MPU_workspace/STM32MP15-Ecosystem-v1.2.0/Developer-Package/SDK/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/usr/include/glib-2.0 -I/home/osboxes/STM32MPU_workspace/STM32MP15-Ecosystem-v1.2.0/Developer-Package/SDK/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/usr/lib/glib-2.0/include -O0 -g3 -Wall -c -fmessage-length=0 --sysroot=/home/osboxes/STM32MPU_workspace/STM32MP15-Ecosystem-v1.2.0/Developer-Package/SDK/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi -MMD -MP -MF"gtk_hello_world.d" -MT"gtk_hello_world.o" -o "gtk_hello_world.o" "/home/osboxes/STM32MP15-Ecosystem-v1.2.0/Developer-Package/stm32mp1-openstlinux-20-02-19/sources/gtk_hello_world_example/gtk_hello_world.c"

Finished building: /home/osboxes/STM32MP15-Ecosystem-v1.2.0/Developer-Package/stm32mp1-openstlinux-20-02-19/sources/gtk_hello_world_example/gtk_hello_world.c

Building target: cross_trial

Invoking: Cross GCC Linker

arm-ostl-linux-gnueabi-gcc -L/home/osboxes/STM32MPU_workspace/STM32MP15-Ecosystem-v1.2.0/Developer-Package/SDK/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/usr/lib/ -mfloat-abi=hard -mtune=cortex-a7 --sysroot=/home/osboxes/STM32MPU_workspace/STM32MP15-Ecosystem-v1.2.0/Developer-Package/SDK/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi -o "cross_trial" ./gtk_hello_world.o  -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0

Finished building target: cross_trial

I will check your settings,

BR,

Milan