Opened 10 years ago

Closed 8 years ago

#7317 closed Patch - Bug Fix (Won't Fix)

[PATCH] sysroot is missing in several locations

Reported by: pebender@… Owned by: beirdo
Priority: minor Milestone: unknown
Component: MythTV - General Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

With commit [20947], sysroot support was added to configure. sysroot was added to in some locations where it was missing in commits [21010], [22255] and [22319]. However, as mentioned in ticket #7088, sysroot is still missing from some locations.

I have attached a patch that addresses the missing sysroots for me.

This patch does three things. First, prepends $SYSROOT to $PREFIX, $LIBDIR and /usr entries in mythplugin *.pro files from which they are missing. Second, it prepends $sysroot to $prefix, $libdir and /user entries in mythtv's configure script and mythplugin's configure script from which they are missing. Third, in the configure scripts' has_library and has_header functions, it disables searching the build system's configuration files and variables for library and include directories when sysroot is set.

Attachments (4)

sysroot.patch (10.8 KB) - added by pebender@… 10 years ago.
configure.patch (854 bytes) - added by fransmeulenbroeks@… 10 years ago.
sysroot-2.patch (9.0 KB) - added by pebender@… 10 years ago.
mytharchive.pro.patch (1.9 KB) - added by fransmeulenbroeks@… 10 years ago.

Download all attachments as: .zip

Change History (14)

Changed 10 years ago by pebender@…

Attachment: sysroot.patch added

comment:1 Changed 10 years ago by paulh

Owner: changed from Isaac Richards to Janne Grunau
Status: newassigned

See #7466 for another patch

Changed 10 years ago by fransmeulenbroeks@…

Attachment: configure.patch added

comment:2 Changed 10 years ago by fransmeulenbroeks@…

I found two more missing $(sysroot)'s in mythplugins configure: THey should also be prepended to the calls of taglib-config. See attached configure.patch

comment:3 Changed 10 years ago by pebender@…

I do not understand the prepending of ${sysroot} to taglib-config. First, as there is no / between ${sysroot} and taglib-config, if sysroot=/home/user/cross-compile, then the result would be /home/user/cross-compiletagelib-config. Second, it is very unlikely that taglib-config is located in ${sysroot}. It is much more likely that it is located in ${sysroot}/usr/bin.

As an aside, I have found that programs using their own *-config script rather than pkg-config are a pain. However, they can be fixed without modifying the configure scripts and make files that call them. In order to make them work, two things must be done when installing the *-config script. First, the *-config script needs to be patched so that it returns the correct path including the ${sysroot} directory. Second, the *-config script needs to be installed in a directory that is in the executable search path. After doing these two things, configure scripts and make files that call the *-config script will work as expected.

comment:4 Changed 10 years ago by anonymous

pebender has a point. I thought I was getting the taglib-config from my native system and not from the cross environment. It turns out it is from the cross environment, so guess this is not useful (btw in the end it turned out to be that taglib-config --prefix gives the wrong path. not sure if taglib-config --cflags would have been better (but of course then sed is needed to get rid of the -I). (actually thinking of it taglib-config should have a --includedir or so, but that is offtopic for mythtv)

comment:5 Changed 10 years ago by robertm

Ticket locked: set

Discussion belongs on lists.

comment:6 Changed 10 years ago by robertm

Ticket locked: unset

Please keep discussion on the list where it belongs, unlocking to allow author to update the ticket.

Changed 10 years ago by pebender@…

Attachment: sysroot-2.patch added

comment:7 Changed 10 years ago by pebender@…

Updated the patch so that it applies after changes were made to mythplugins configure script.

Changed 10 years ago by fransmeulenbroeks@…

Attachment: mytharchive.pro.patch added

comment:8 Changed 10 years ago by fransmeulenbroeks@…

While trying to build I noticed there is some form of double dipping. In mytharchve/mytharchive/Makefile there was $sysroot with an already prefixed pahtname. This caused the png and ac3 files etc to be installed at the wrong location. THe attached patch for mytharchive.pro fixes this. I'll leave it to the experts to decide on whehter it is a proper patch. Feel free to contact me in case of unclarities or if testing is needed.

comment:9 Changed 9 years ago by beirdo

Owner: changed from Janne Grunau to beirdo
Summary: sysroot is missing in several locations[PATCH] sysroot is missing in several locations
Type: defectPatch - Bug Fix

comment:10 Changed 8 years ago by beirdo

Resolution: Won't Fix
Status: assignedclosed

This patch is woefully out of date, and while trying to make it apply to current master, I ran into issues. Please update this to work as desired with what is currently in git master, and reopen the ticket with that attached. In the meantime, I'm closing this ticket.

Note: See TracTickets for help on using tickets.