bugGPSD - Bugs: bug #36701, Cross-compilation problems

 
 

bug #36701: Cross-compilation problems

Submitted by:  Stephen Cavilia <kc2zgu>
Submitted on:  Thu 21 Jun 2012 03:57:02 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 10 Sep 2012 06:13:53 PM UTC, comment #2:

The problem with the ncurses check is, at least on every Linux system I've looked at, there is never a pkgconfig file for ncurses present. So the pkgconfig check will usually fail, and the only fallback (except for hard-coded freebsd and openbsd cases) is running ncurses-config, which will never work and shouldn't even be attempted in a cross-compiling situation.

Stephen Cavilia <kc2zgu>
Mon 10 Sep 2012 03:50:20 PM UTC, comment #1:

On your point 1: I have applied the patch.

On your point 2: The local ncurses5-config will be run only if the previous package check fails; you can set the binary to a cross version with the environment variable PKG_CONFIG.

On your point 3: GPSD's build system is scons. You may wish to try to test if other scons builds work in your environment. If they don't, then please file a bug with scons upstream; if they do, please file a more detailed bug report here.

On your point 4: Good, it sounds like chrpath upstream has gotten its act together.

Eric S. Raymond <esr>
Project Administrator
Thu 21 Jun 2012 03:57:02 PM UTC, original submission:

Some issues I've found compiling gpsd 3.6 for an ARM single board computer using Freescale's LTIB system:

1. The initialization of LIBPATH in SConstruct includes installdir('libdir'), which will point to the wrong place when using a sysroot, typically causing the linker to try to use native libraries. The attached patch sets this path correctly if a sysroot was specified.

2. The ncurses check can also attempt to use native libraries since it runs the (native) ncurses5-config program if ncurses is not in pkgconfig. I have not looked into fixing this as I am not using the ncurses-based programs.

3. The linker does not find the crt1.o unless it is explicitly copied to the sysroot. This is probably due to something in the toolchain or target glibc install or how I'm invoking scons from the rpm spec, however, other packages in the system can be compiled without having crt1.o and friends in the sysroot so it may be gpsd's build system calling the compiler in a nonstandard way.

4. A "cross chrpath" does not seem strictly necessary, since a native chrpath (at least on my gentoo system) can still manipulate ARM files. The SConstruct still attempts to call it with a target prefix, so it currently has to be symlinked to something like arm-linux-chrpath. If a native chrpath can be assumed to always be usable, it should simply call it instead of requiring a target-specific version.

Stephen Cavilia <kc2zgu>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #26076:  gpsd-3.6-scons-libdir.patch added by kc2zgu (587B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by esr (Posted a comment)
  • -unavailable- added by kc2zgu (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 22 Nov 2013 01:48:01 PM UTCesrOpen/ClosedOpen=>Closed
    Mon 10 Sep 2012 03:50:20 PM UTCesrStatusNone=>Fixed
    Thu 21 Jun 2012 03:57:02 PM UTCkc2zguAttached File-=>Added gpsd-3.6-scons-libdir.patch, #26076

    Back to the top


    Powered by Savane 3.1-cleanup1