I have a GTK-based ARM project that was historically developed on a 32-bit Ubuntu virtual machine. Presently, I’m attempting to migrate that to a new 64-bit Arch Linux development box. I’m not sure what to do with the errors produced by the two routes I’ve taken.
If I tell the linker to use /usr/lib the compilation will halt telling me
/usr/lib/librt.so: file not recognized: File format not recognized
So, assuming that was a 32-vs-64-bit issue, I directed the gcc toward /usr/lib32 and received the following
/usr/bin/arm-linux-gnueabi - ld: skipping incompatible /usr/lib32/librt.so when searching for -lrt
/usr/bin/arm-linux-gnueabi - ld: skipping incompatible /usr/lib32/librt.a when searching for -lrt
/usr/bin/arm-linux-gnueabi - ld: skipping incompatible /usr/lib32/libpthread.so when searching for -lpthread
/usr/bin/arm-linux-gnueabi - ld: skipping incompatible /usr/lib32/libpthread.a when searching for -lpthread
/usr/bin/arm-linux-gnueabi - ld: cannot find -lz
/usr/bin/arm-linux-gnueabi - ld: cannot find -lsqlite3
/usr/bin/arm-linux-gnueabi - ld: cannot find -lusb-1.0
/usr/bin/arm-linux-gnueabi - ld: cannot find -lssl
and so on. I tried installing lib32-sqlite from the Arch repository to no avail.
With either directory, I receive the following warnings many, many times over, which I’m also unsure of
/usr/include/pthread.h:672:6: warning: '__regparm__' attribute directive ignored [-Wattributes]
/usr/include/pthread.h:684:3: warning: '__regparm__' attribute directive ignored [-Wattributes]
/usr/include/pthread.h:729:6: warning: '__regparm__' attribute directive ignored [-Wattributes]
I’m not sure if that’s simply an artifact from outdated code being compiled against up-to-date libraries or what, but it’s something I’ll want to resolve before too long.
EDIT: My target architecture is an ARM926EJ-S / i.MX27
I’m going to venture a guess and say that your crosscompiling environment is not referencing the right libraries/header files. That is, they are referencing the build libraries/headers (i586?) and not the croscompiling libraries/headers for ARM
arm-linux-gnueabi.