Bug 4592 - libXfont and libXft building failed, cross-compilation error
Summary: libXfont and libXft building failed, cross-compilation error
Status: RESOLVED WORKSFORME
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: 2011.11
Hardware: PC Linux
: P5 minor
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-10 15:45 UTC by Mario
Modified: 2012-01-31 19:57 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments
.config file of the buildroot (31.77 KB, text/plain)
2011-12-12 09:17 UTC, Mario
Details
config.log of the xlib_libXfont package (52.08 KB, text/plain)
2011-12-12 09:17 UTC, Mario
Details
config.log of the xlib_libXft package (41.91 KB, text/x-log)
2011-12-12 09:17 UTC, Mario
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mario 2011-12-10 15:45:35 UTC
Hi :)
 I was  getting this type of errors when building an arm images with Xorg:


  CC     xftswap.lo
  CC     xftxlfd.lo
  CCLD   libXft.la
/usr/lib/libfreetype.so: file not recognized: File format not recognized
collect2: ld returned 1 exit status
make[3]: *** [libXft.la] Error 1

I was able to correct the problem adding this line to the package definition file xlib_libXfont.mk:
XLIB_LIBXFONT_CONF_ENV = FREETYPE_LIBS=$(STAGING_DIR)/usr/lib

and also to xlib_libXft.mk:
XLIB_LIBXFT_CONF_ENV = FREETYPE_LIBS=$(STAGING_DIR)/usr/lib


Thanks a lot for this great piece of software.
Comment 1 Peter Korsgaard 2011-12-11 21:53:05 UTC
Sorry, I cannot reproduce it here. Please provide some more details:

- What is your exact .config?
- Do you have freetype development headers/libs on your host?
- libXft uses pkg-config to find freetype, and freetype depends on host-pkg-config, so that should be fine. Could you please attach your output/build/xlib_libXft-2.1.14/config.log file?

Thanks.
Comment 2 Mario 2011-12-12 09:17:01 UTC
Created attachment 3878 [details]
.config file of the buildroot
Comment 3 Mario 2011-12-12 09:17:36 UTC
Created attachment 3884 [details]
config.log of the xlib_libXfont package
Comment 4 Mario 2011-12-12 09:17:56 UTC
Created attachment 3890 [details]
config.log of the xlib_libXft package
Comment 5 Mario 2011-12-12 09:18:21 UTC
Sorry for the lack of details in the first mail. I'm attaching the .config file. For building i'm using a work station with debian squeeze and i have the development files of libfreetype installed:

turin@cronos:~$ dpkg -l libfreetype6-dev
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                         Version                      Description
+++-============================-============================-========================================================================
ii  libfreetype6-dev             2.4.4-1~bpo60+1              FreeType 2 font engine, development files

I'm also attaching the config.log files of libXft and libXfont packages.
Thanks.
Comment 6 Mario 2011-12-12 09:19:10 UTC
Hello,
I was getting similar errors with other packages and i start investigating in other direction when i found the LD_LIBRARY_PATH pointing at /usr/lib . Pointing that env variable to /home/turin/proyectos/mini2440/buildroot/buildroot-2011.11/output/host/usr/lib made the building process without errors. My computer is still compilling, so when it finish y will try to restart the building with a clean LD_LIBRARY_PATH variable to see if this was the problem.
Thanks :)
Comment 7 Peter Korsgaard 2011-12-12 09:31:31 UTC
(In reply to comment #6)
> I was getting similar errors with other packages and i start investigating in
> other direction when i found the LD_LIBRARY_PATH pointing at /usr/lib .
> Pointing that env variable to
> /home/turin/proyectos/mini2440/buildroot/buildroot-2011.11/output/host/usr/lib
> made the building process without errors. My computer is still compilling, so
> when it finish y will try to restart the building with a clean LD_LIBRARY_PATH
> variable to see if this was the problem.

LD_LIBRARY_PATH can indeed screw up stuff. Normally it shouldn't be needed for a location like /usr/lib, so I suggest you delete rather than pointing to your buildroot dir (we already use rpath, so it shouldn't be needed for buildroot either).
Comment 8 Mario 2011-12-12 12:16:28 UTC
Hi,
Ok, setting LD_LIBRARY_PATH to none solves the problems. I,m sorry for the inconveniences. Maybe a note in the FAQ about this would be fine.
Thanks for everything :)
Comment 9 Thomas Petazzoni 2012-01-31 19:57:10 UTC
User has said that the problem was solved, and was on his side. Closing the bug.