LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   Cross compile libX11 source code error (https://www.linuxquestions.org/questions/linux-desktop-74/cross-compile-libx11-source-code-error-4175612133/)

blue_tao 08-17-2017 09:29 AM

Cross compile libX11 source code error
 
Hi Guys,

When I cross compile libX11, and run the ./configure --prefix=/usr, I got the error as follow.

checking keysym definitions... configure: error: Cannot find keysymdef.h

However, I check the file keysymdef.h, it exists on my environment "~/sysroot/usr/include/X11/".

One more question is that there is no any output while I execute the "pkg-config --cflags xproto", but xproto is also installed on my environment.

Could anyone give me some suggestions?
Thanks so much!

business_kid 08-17-2017 11:10 AM

Why not at least try a symlink to ~/sysroot/usr/include/X11/keysymdef.h in /usr/include/X11? If iy passes that, stop. It's searching your own system for files, so any libs it links in will be for the wrong OS. Do a 'make clean'

Where possible, it's better to do a chroot so that /usr seen by your compiling terminal is actually ~/sysroot/usr; then that sort of error doesn't occur. That may take some setting up. A look at the CLFS book on linuxfromscratch.org should help you.

blue_tao 08-17-2017 09:00 PM

Quote:

Originally Posted by business_kid (Post 5749305)
Why not at least try a symlink to ~/sysroot/usr/include/X11/keysymdef.h in /usr/include/X11? If iy passes that, stop. It's searching your own system for files, so any libs it links in will be for the wrong OS. Do a 'make clean'

Where possible, it's better to do a chroot so that /usr seen by your compiling terminal is actually ~/sysroot/usr; then that sort of error doesn't occur. That may take some setting up. A look at the CLFS book on linuxfromscratch.org should help you.

Hi Sir,

Thanks very much for your suggestion!
I will try it again!

Best Regards!
Tao

blue_tao 08-17-2017 10:40 PM

1 Attachment(s)
Quote:

Originally Posted by blue_tao (Post 5749468)
Hi Sir,

Thanks very much for your suggestion!
I will try it again!

Best Regards!
Tao

Hi,

It doesn't work. I'm also confused why there is no any output for ""pkg-config --cflags xproto/xcb-proto/zlib"", but these xxx.pc files exist on my system.
I have no idea how to resolve this issue.

config.log is attached.


All times are GMT -5. The time now is 04:59 PM.