You are not logged in.

#1 2008-08-02 17:08:05

slackhack
Member
Registered: 2004-06-30
Posts: 738

permissions issue making to /usr/lib

I'm trying to make gmerlin multimedia architecture, but it fails with permission denied trying to write to /usr/lib. I only build packages here and there occasionally, but i don't recall ever encountering this problem. what do I do in this case to bypass the error?

/bin/install: cannot create regular file `/usr/lib/libgmerlin_gtk.so.0.0.0': Permission denied
make[3]: *** [install-libLTLIBRARIES] Error 1
make[3]: Leaving directory `/var/abs/local/gmerlin/src/gmerlin-0.3.8/lib/gtk'
make[2]: *** [install-am] Error 2
make[2]: Leaving directory `/var/abs/local/gmerlin/src/gmerlin-0.3.8/lib/gtk'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/var/abs/local/gmerlin/src/gmerlin-0.3.8/lib'
make: *** [install-recursive] Error 1
==> ERROR: Build Failed.
    Aborting...

Offline

#2 2008-08-02 17:30:23

ghostHack
Member
From: Bristol UK
Registered: 2008-02-29
Posts: 261

Re: permissions issue making to /usr/lib

The problem here is that during the process of building the package the Makefile is trying to install the libgmerlin_gtk.so.0.0.0 file onto your main system, rather than into the pkg directory where is needs to go.  The build is failing because regular users can't write to /usr/lib.  You need to look at the Makefile and find out if/why this path has been hardcoded or if there is a DESTDIR or similar variable you need to set.

Offline

#3 2008-08-02 17:38:24

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: permissions issue making to /usr/lib

As it's not clear from your post if you're doing this manually or with makepkg, I'll just add that the 'make install' stage of a manual build, which appears to be where your error is, has to be done as root.

Offline

#4 2008-08-02 18:02:49

slackhack
Member
Registered: 2004-06-30
Posts: 738

Re: permissions issue making to /usr/lib

tomk wrote:

As it's not clear from your post if you're doing this manually or with makepkg, I'll just add that the 'make install' stage of a manual build, which appears to be where your error is, has to be done as root.

Oh -- sorry for being unclear. this is during makepkg. I think from the way ghostHack described it he's on the right track.

uh oh -- I just untarred the tarball and there's two makefiles, Makefile.am and Makefile.in. Makefile.am is only about 20 lines, and Makefile.in is about 800 lines with what looks like some of the same info in it, plus a whole lot more. Since it's so short, I'll paste Makefile.am here so you can take a look and see if that's the one I should change, or if what I need isn't there and I should look in Makefile.in, instead. I'm not really seeing what to change in this one, unless it's the pkgdatadir variable?

And if I need a DESTDIR variable, I just set that on the commandline before running makepkg, like doing an export, or I add it to one of the Makefiles, or do I add it to the configure command in the PKGBUILD?

# aclocal Path
ACLOCAL_AMFLAGS = -I m4

if HAVE_GTK
gtk_pc = gmerlin-gtk.pc
else
gtk_pc =
endif

SUBDIRS = po lib plugins tests apps icons skins include doc m4 utils osd

pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = gmerlin.pc $(gtk_pc)

pkgdatadir = $(datadir)/gmerlin/
pkgdata_DATA = plugin.sym
dist_pkgdata_DATA = plugin.sym


EXTRA_DIST= config.rpath gmerlin.spec.in gmerlin.pc.in autogen.sh cvs_clean.sh cpuinfo.sh make_potfiles

##---> there are a number of DESTDIR references in the Makefile.in:

$ cat Makefile.in |grep DESTDIR
am__installdirs = "$(DESTDIR)$(pkgdatadir)" \
    "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(pkgdatadir)"
    test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)"
      echo " $(dist_pkgdataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgdatadir)/$$f'"; \
      $(dist_pkgdataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgdatadir)/$$f"; \
      echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \
      rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \
    test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
      echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
      $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \
      echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
      rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \
    test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)"
      echo " $(pkgdataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgdatadir)/$$f'"; \
      $(pkgdataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgdatadir)/$$f"; \
      echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \
      rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \
           && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
           && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
           && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
            if test -n "$(DESTDIR)"; then \
              echo "  (check DESTDIR support)"; \
    for dir in "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(pkgdatadir)"; do \

they don't seem to be defined anywhere, though, at least that I can see. I have to assume either you enter it on the .configure line somehow (./configure  --DESTDIR=./. (?) ./configure --DESTDIR=usr (?) ) or else again there's a command like the export command. :?:

Last edited by slackhack (2008-08-02 18:47:34)

Offline

#5 2008-08-02 19:20:09

ghostHack
Member
From: Bristol UK
Registered: 2008-02-29
Posts: 261

Re: permissions issue making to /usr/lib

to use DESTDIR, the 'make install' line in your PKGBUILD should look like

make DESTDIR=$pkgdir install || return 1

Offline

#6 2008-08-02 21:27:38

slackhack
Member
Registered: 2004-06-30
Posts: 738

Re: permissions issue making to /usr/lib

ghostHack wrote:

to use DESTDIR, the 'make install' line in your PKGBUILD should look like

make DESTDIR=$pkgdir install || return 1

thanks, that seemed to work. the program's throwing some kind of "gdk_pixbuf"  segfault though, I guess open movie editor is going to be delayed until I can figure that out. tongue

Offline

Board footer

Powered by FluxBB