Opened 13 years ago

Closed 12 years ago

#1198 closed defect (fixed)

configure fails to detect installed libraries on 64-bit machines

Reported by: mythtv@… Owned by: Janne Grunau
Priority: minor Milestone: 0.20
Component: mythtv Version: 0.20
Severity: medium Keywords:
Cc: Ticket locked: no

Description

The has_library (and to a lesser extent the has_header) functions in the mythtv/mythplugins configure scripts does not correctly detect some libraries on 64 bit machines.

I will attach two patches shortly.

Marking as milestone unknown as I don't know if some 64-bit distros put 64bit libs into /lib and /usr/lib. This is needed for Mandriva 2006.0 x86_64 in my experience.

Attachments (5)

mythtv_configure.diff (913 bytes) - added by mythtv@… 13 years ago.
Patch to mythtv's configure script
mythplugins_configure.diff (959 bytes) - added by mythtv@… 13 years ago.
Patch to mythplugins's configure script
mythtv_configure.2.diff (7.3 KB) - added by mythtv@… 13 years ago.
A full patch to support lib64 libdir names (remains optional)
mythplugins_configure.2.diff (7.1 KB) - added by mythtv@… 13 years ago.
A full patch to support lib64 libdir names (remains optional)
fix_libdir64.diff (2.1 KB) - added by mythtv@… 13 years ago.
Fix typo in mythtv/configure and add code to mythplugins to detect installed libs/headers of dependancies correctly

Download all attachments as: .zip

Change History (14)

Changed 13 years ago by mythtv@…

Attachment: mythtv_configure.diff added

Patch to mythtv's configure script

Changed 13 years ago by mythtv@…

Attachment: mythplugins_configure.diff added

Patch to mythplugins's configure script

Changed 13 years ago by mythtv@…

Attachment: mythtv_configure.2.diff added

A full patch to support lib64 libdir names (remains optional)

Changed 13 years ago by mythtv@…

A full patch to support lib64 libdir names (remains optional)

comment:1 Changed 13 years ago by mythtv@…

Version: head

Added an argument to the ./configure scripts to be able to pass in a libdir name (e.g. "lib64").

I couldn't use the standard --libdir option that was already in configure as that hardcoded the whole prefix infront of it and I only wanted the base name. It also conflicted logically with the relocatable prefix stuff inside mythcontext.cpp.

This is used when searching for headers and libraries it does not actually edit any -L paths as I've not found the need so far - everything just works in that respect.

It will also affect where myth puts it's libraries, plugins and filters.

On my system, I pass the argument --libdir-name=lib64 to get things to work nicely.

By default tho', nothing has changed. You have to be pro-active in changing to lib64, it will not auto-detect as some x86_64 distros (namely Isaac's) do not use the "lib64" convention and just use the normal "lib"

Hope this helps someone.

PS Please now ignore the first two patches as these are obsolete.

comment:2 Changed 13 years ago by anonymous

Duplicate of ticket #1001?

comment:3 Changed 13 years ago by Colin Guthrie <mythtv@…>

Yes it looks like it. Sorry 'bout that.

Having had a very quick look at the patch in #1001, it would seem to make the plugins directory absolutely static (the changes to mythcontext.cpp)

In my patch, I was specific to say that I was setting libdirname, not the libdir as mythcontext.cpp seems to try and do clever things by manipulating what the compile time prefix was at runtime, presumably incase things have moved. Patch in #1001 would break this flexibility I think (not really looked to closely tho').

comment:4 Changed 13 years ago by Isaac Richards

Resolution: fixed
Status: newclosed

(In [9004]) Support for broken multiarch crap.

Re-run configure, might need a distclean.

Closes #1001, #1198.

Changed 13 years ago by mythtv@…

Attachment: fix_libdir64.diff added

Fix typo in mythtv/configure and add code to mythplugins to detect installed libs/headers of dependancies correctly

comment:5 Changed 13 years ago by mythtv@…

Resolution: fixed
Status: closedreopened

Typo makes this fail for mythtv/configure.

Installed libs/dependancies not correctly detected for mythplugins.

See attached patch: fix_libdir64.diff

comment:6 Changed 13 years ago by Isaac Richards

Resolution: fixed
Status: reopenedclosed

(In [9032]) I messed up the libdir_name stuff, new patch from #1198 fixes it.

Closes #1198.

comment:7 Changed 13 years ago by sloncho@…

Resolution: fixed
Status: closedreopened
Version: head0.20

Using 0.20-fixes on SuSE 10.0 x86_64.

The configure script runs OK, but fails to add -L/usr/X11R6/lib64 to mythgallery and mythmusic Makefiles. It did however add it in mythdvd/mtd Makefile, so it detects the directory correctly.

W/o adding this to LIBS line in the above mentioned Makefiles, their build fails. After manually adding them, I was able to build the plugins.

Cheers Sunny

comment:8 Changed 12 years ago by Janne Grunau

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

comment:9 in reply to:  7 Changed 12 years ago by Janne Grunau

Milestone: unknown0.20
Resolution: fixed
Status: newclosed

Replying to sloncho@gmail.com:

Using 0.20-fixes on SuSE 10.0 x86_64.

The configure script runs OK, but fails to add -L/usr/X11R6/lib64 to mythgallery and mythmusic Makefiles. It did however add it in mythdvd/mtd Makefile, so it detects the directory correctly.

This is a different issue. if the problem still persist please open a new ticket.

Note: See TracTickets for help on using tickets.