You are not logged in.

#1 2014-02-15 18:53:16

myles
Member
Registered: 2011-10-06
Posts: 40

[SOLVED] executable on /opt can't be called from PKGBUILD

Why can a PKGBUILD not find an executable on a different partition?  Specifically, pdflatex is installed at /usr/local/texlive/2013/bin/x86_64-linux/pdflatex.  The PKGBUILD for bibtex2html contains a call to 'pdflatex' but can't find it.  If I change the call to include to full path it executes fine.

/etc/fstab contains:

UUID=ef571834-e320-4aec-9fbe-13b448009621 /opt ext2 defaults 0 1
$ which pdflatex
/usr/local/texlive/2013/bin/x86_64-linux/pdflatex

I am wondering if the 'defaults' option has worked when I see this:

$ mount | grep opt
/dev/sda9 on /opt type ext2 (rw,relatime)

Last edited by myles (2014-02-16 12:32:10)

Offline

#2 2014-02-15 18:58:50

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] executable on /opt can't be called from PKGBUILD

Is it in your $PATH?

Offline

#3 2014-02-15 21:33:37

myles
Member
Registered: 2011-10-06
Posts: 40

Re: [SOLVED] executable on /opt can't be called from PKGBUILD

Yes, and it is in root's PATH too.

I should have said in my first post that I can call pdflatex from the command line and also 'which pdflatex' shows the full path to the correct executable.

There was a similar (unresolved) question here about an executable
under /opt: https://bbs.archlinux.org/viewtopic.php?pid=1339379 which is why I was wondering if /opt has been mounted properly.  But then, if that were the case I shouldn't be able to run it at all.

Offline

#4 2014-02-16 04:07:31

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: [SOLVED] executable on /opt can't be called from PKGBUILD

I'm confused, what does /opt have to do with anything when the software is installed to /usr/local?

Offline

#5 2014-02-16 04:09:36

HalosGhost
Forum Fellow
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,097
Website

Re: [SOLVED] executable on /opt can't be called from PKGBUILD

I know it's not quite related, but I am also fascinated by the notion of having /opt on a separate partition. Do you really just imagine that you'll be installing a ton of stuff that doesn't make sense in /usr?

All the best,

-HG

Offline

#6 2014-02-16 04:11:12

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] executable on /opt can't be called from PKGBUILD

Scimmia wrote:

I'm confused, what does /opt have to do with anything when the software is installed to /usr/local?

The first example in https://bbs.archlinux.org/viewtopic.php?pid=1339379

[florian@moody ~]$ ls -l /usr/sbin/hpasmcli
lrwxrwxrwx 1 root root 26 Oct 14 23:30 /usr/sbin/hpasmcli -> /opt/compaq/utils/hpasmcli

Offline

#7 2014-02-16 04:16:13

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: [SOLVED] executable on /opt can't be called from PKGBUILD

karol wrote:
Scimmia wrote:

I'm confused, what does /opt have to do with anything when the software is installed to /usr/local?

The first example in https://bbs.archlinux.org/viewtopic.php?pid=1339379

[florian@moody ~]$ ls -l /usr/sbin/hpasmcli
lrwxrwxrwx 1 root root 26 Oct 14 23:30 /usr/sbin/hpasmcli -> /opt/compaq/utils/hpasmcli

Sure, if you're just adding a symlink that's in $PATH, but with the path given in the OP, that doesn't seem to be the case.

Offline

#8 2014-02-16 04:25:02

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] executable on /opt can't be called from PKGBUILD

$ pkgfile -v pdflatex
extra/texlive-bin 2013.30973-7	/usr/bin/pdflatex

How did you install texlive?
Is /usr on a separate partition too?

Offline

#9 2014-02-16 04:46:43

apg
Developer
Registered: 2012-11-10
Posts: 211

Re: [SOLVED] executable on /opt can't be called from PKGBUILD

Are you sure its in your $PATH at the time it's called in the PKGBUILD?  makepkg may source up to 4 files, including /etc/profile, any of which can overwrite $PATH.

Offline

#10 2014-02-16 12:31:50

myles
Member
Registered: 2011-10-06
Posts: 40

Re: [SOLVED] executable on /opt can't be called from PKGBUILD

Scimmia wrote:

I'm confused, what does /opt have to do with anything when the software is installed to /usr/local?

I'm confused too, sorry, I keep the TexLive CD in /opt but installed to /usr so:

$ pkgfile -v pdflatex
extra/texlive-bin 2012.0-3/files	usr/bin/pdflatex

I have checked PATH all through the PKGBUILD and it looked fine, so I tried calling pdflatex in each function and it is found ok.  I uninstalled bibtex2html (using pacaur) and reinstalled it; that found pdflatex too.  So now I am beginning to doubt my initial perception of the problem, and didn't keep a copy of the initial message.  I can't reboot just now but when I do I will make sure it is still fixed.

Thank you everyone for your replies.

Offline

#11 2014-02-16 12:46:01

myles
Member
Registered: 2011-10-06
Posts: 40

Re: [SOLVED] executable on /opt can't be called from PKGBUILD

HalosGhost wrote:

I know it's not quite related, but I am also fascinated by the notion of having /opt on a separate partition. Do you really just imagine that you'll be installing a ton of stuff that doesn't make sense in /usr?

This is mainly for historical reasons; as my laptop hard drive has been repartitioned so many times, when faced with having to install some large stuff quickly, I couldn't grow / anymore so moved /opt at the other end of the disk.  A better solution would have been to add the partition as another volume via LVM but the init hook can only unlock one encrypted root.  Now I have modified it to unlock more than one, as described in a post somewhere.

Offline

#12 2014-02-16 22:14:35

myles
Member
Registered: 2011-10-06
Posts: 40

Re: [SOLVED] executable on /opt can't be called from PKGBUILD

myles wrote:
$ pkgfile -v pdflatex
extra/texlive-bin 2012.0-3/files	usr/bin/pdflatex

Just realised that is irrelevant because I installed TexLive 2013 from the CD image and not from any Arch package.  It is not even accurate, after running

pkgfile --update

I get

$ pkgfile -v pdflatex  
extra/texlive-bin 2013.30973-7	/usr/bin/pdflatex

Offline

Board footer

Powered by FluxBB