You are not logged in.

#1 2014-01-24 12:22:00

billybob
Member
Registered: 2014-01-24
Posts: 3

[SOLVED]faketime resorts to wrong lib path

Hello, I had libfaketime 0.9.5-1 installed, and when running the example:

faketime '2008-12-24 08:15:42' /bin/date

it complains that libfaketime.so.1 is not found, and showing wrong result:

ERROR: ld.so: object '/usr/local/lib/faketime/libfaketime.so.1' from LD_PRELOAD cannot be preloaded: ignored.
Fri Jan 24 20:11:39 CST 2014

Hmm... seems that it should resort to /usr/lib/faketime/ instead of /usr/local/lib/faketime/  ?

Thanks!

Last edited by billybob (2014-01-24 13:03:27)


Who has seen the wind?

Offline

#2 2014-01-24 12:47:45

Neburski
Member
Registered: 2009-09-15
Posts: 118

Re: [SOLVED]faketime resorts to wrong lib path

From https://www.archlinux.org/packages/comm … bfaketime/ I see that the faketime libraries are being installed under /usr/lib .

However from the Makefile of libfaketime I see that the library directory is set to /usr/local/lib

PREFIX ?= /usr/local
LIBDIRNAME ?= /lib/faketime

There are 2 solutions to this problem:

  1. Make a symbolic link "faketime" in /usr/local/lib to point to /usr/lib/faketime. This is the easiest solution, but not the cleanest. If you ever plan on removing the libfaketime package then you'll need to manually remove the link as well.

  2. Make a PKGBUILD where you correct the Makefile so it doesn't set the library directory to /usr/local/lib, but to /usr/lib (or effectively install the libraries under /usr/local/lib, but afaik Arch prefers to install all libraries under /usr/lib). This is IMO the more correct method, but is not as easy as option 1.

Offline

#3 2014-01-24 12:49:32

billybob
Member
Registered: 2014-01-24
Posts: 3

Re: [SOLVED]faketime resorts to wrong lib path

Thanks! Fired a bug report at https://bugs.archlinux.org/task/38640


Who has seen the wind?

Offline

#4 2014-01-24 12:54:02

progandy
Member
Registered: 2012-05-17
Posts: 5,322

Re: [SOLVED]faketime resorts to wrong lib path

You don't have to fix the makefile, just the PKGBUILD:

build() {
  cd "${pkgname}-${pkgver}"
  make PREFIX=/usr
}

| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

#5 2014-01-24 13:01:58

Neburski
Member
Registered: 2009-09-15
Posts: 118

Re: [SOLVED]faketime resorts to wrong lib path

progandy wrote:

You don't have to fix the makefile, just the PKGBUILD:

build() {
  cd "${pkgname}-${pkgver}"
  make PREFIX=/usr
}

Yeah sorry, I'm just too used on working on projects not available in repositories.

The PKGBUILD seems to only have the "PREFIX=/usr" at the installation phase, but not at the build phase.
The solution has already been posted at the bug report.

@billybob:
I suggest you download the PKGBUILD and manually make the adjustment as suggested here and then use "makepkg" to build the pkg, then install it using pacman. You can then remove the symbolic link you made in /usr/local/lib and your system will be "clean" again.

Last edited by Neburski (2014-01-24 13:09:10)

Offline

#6 2014-01-24 13:14:07

billybob
Member
Registered: 2014-01-24
Posts: 3

Re: [SOLVED]faketime resorts to wrong lib path

Thanks for your suggestions smile


Who has seen the wind?

Offline

Board footer

Powered by FluxBB