How to run autotools from a nonstandard directory?
I'm trying to build a library on a remote CI server, but I don't have root privileges. The library requires autoconf, automake and libtool packages to be installed. I can't do that with apt-get install, so I tried to do a workaround: downloading the .deb packages and exporting PATHs so that autoconf, libtoolize, etc. can be found.
The problem is that the binaries in these packages have some paths to additional scripts (installed as part of the packages) hard-coded. Now I get this error:
libtoolize: $pkgltdldir is not a directory: `/usr/share/libtool'
Is there a way to change this default path with an environment variable (in the same way as here https://superuser.com/a/1144948/62460)?
I tried exporting $pkgltdldir
but that didn't work.
linux autoconf autotools
add a comment |
I'm trying to build a library on a remote CI server, but I don't have root privileges. The library requires autoconf, automake and libtool packages to be installed. I can't do that with apt-get install, so I tried to do a workaround: downloading the .deb packages and exporting PATHs so that autoconf, libtoolize, etc. can be found.
The problem is that the binaries in these packages have some paths to additional scripts (installed as part of the packages) hard-coded. Now I get this error:
libtoolize: $pkgltdldir is not a directory: `/usr/share/libtool'
Is there a way to change this default path with an environment variable (in the same way as here https://superuser.com/a/1144948/62460)?
I tried exporting $pkgltdldir
but that didn't work.
linux autoconf autotools
First thing I'd try is to look forpkgltdldir
in the scripts, see how this variable gets set, see if it doesn't depend on some kind of prefix variable, and then set the prefix variable first.
– dirkt
Jun 11 '18 at 8:04
1
I used sed to replace all occurrences of "/usr/share" with my path in the Perl script libtoolize. It's not a clean solution but it works.
– Machta
Jun 11 '18 at 11:16
add a comment |
I'm trying to build a library on a remote CI server, but I don't have root privileges. The library requires autoconf, automake and libtool packages to be installed. I can't do that with apt-get install, so I tried to do a workaround: downloading the .deb packages and exporting PATHs so that autoconf, libtoolize, etc. can be found.
The problem is that the binaries in these packages have some paths to additional scripts (installed as part of the packages) hard-coded. Now I get this error:
libtoolize: $pkgltdldir is not a directory: `/usr/share/libtool'
Is there a way to change this default path with an environment variable (in the same way as here https://superuser.com/a/1144948/62460)?
I tried exporting $pkgltdldir
but that didn't work.
linux autoconf autotools
I'm trying to build a library on a remote CI server, but I don't have root privileges. The library requires autoconf, automake and libtool packages to be installed. I can't do that with apt-get install, so I tried to do a workaround: downloading the .deb packages and exporting PATHs so that autoconf, libtoolize, etc. can be found.
The problem is that the binaries in these packages have some paths to additional scripts (installed as part of the packages) hard-coded. Now I get this error:
libtoolize: $pkgltdldir is not a directory: `/usr/share/libtool'
Is there a way to change this default path with an environment variable (in the same way as here https://superuser.com/a/1144948/62460)?
I tried exporting $pkgltdldir
but that didn't work.
linux autoconf autotools
linux autoconf autotools
asked Jun 10 '18 at 7:39
MachtaMachta
1012
1012
First thing I'd try is to look forpkgltdldir
in the scripts, see how this variable gets set, see if it doesn't depend on some kind of prefix variable, and then set the prefix variable first.
– dirkt
Jun 11 '18 at 8:04
1
I used sed to replace all occurrences of "/usr/share" with my path in the Perl script libtoolize. It's not a clean solution but it works.
– Machta
Jun 11 '18 at 11:16
add a comment |
First thing I'd try is to look forpkgltdldir
in the scripts, see how this variable gets set, see if it doesn't depend on some kind of prefix variable, and then set the prefix variable first.
– dirkt
Jun 11 '18 at 8:04
1
I used sed to replace all occurrences of "/usr/share" with my path in the Perl script libtoolize. It's not a clean solution but it works.
– Machta
Jun 11 '18 at 11:16
First thing I'd try is to look for
pkgltdldir
in the scripts, see how this variable gets set, see if it doesn't depend on some kind of prefix variable, and then set the prefix variable first.– dirkt
Jun 11 '18 at 8:04
First thing I'd try is to look for
pkgltdldir
in the scripts, see how this variable gets set, see if it doesn't depend on some kind of prefix variable, and then set the prefix variable first.– dirkt
Jun 11 '18 at 8:04
1
1
I used sed to replace all occurrences of "/usr/share" with my path in the Perl script libtoolize. It's not a clean solution but it works.
– Machta
Jun 11 '18 at 11:16
I used sed to replace all occurrences of "/usr/share" with my path in the Perl script libtoolize. It's not a clean solution but it works.
– Machta
Jun 11 '18 at 11:16
add a comment |
1 Answer
1
active
oldest
votes
In the shell script libtoolize (version 2.4.2 and 2.4.6), four variables are hardcoded:
datadir=/usr/share
pkgdatadir=/usr/share/libtool
pkgltdldir=/usr/share/libtool
aclocaldir=/usr/share/aclocal
Soon afterwards there is the following section:
# Allow the user to override the master libtoolize repository:
if test -n "$_lt_pkgdatadir"; then
pkgltdldir="$_lt_pkgdatadir"
pkgdatadir="$_lt_pkgdatadir/libltdl"
aclocaldir="$_lt_pkgdatadir/libltdl/m4"
Setting $_lt_pkgdatadir to the libtool directory will thus work (works for me - but only if the aclocal directory is in a subdirectory of libltdl named m4).
Given this, your sed solution seems quite sensible.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1330044%2fhow-to-run-autotools-from-a-nonstandard-directory%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
In the shell script libtoolize (version 2.4.2 and 2.4.6), four variables are hardcoded:
datadir=/usr/share
pkgdatadir=/usr/share/libtool
pkgltdldir=/usr/share/libtool
aclocaldir=/usr/share/aclocal
Soon afterwards there is the following section:
# Allow the user to override the master libtoolize repository:
if test -n "$_lt_pkgdatadir"; then
pkgltdldir="$_lt_pkgdatadir"
pkgdatadir="$_lt_pkgdatadir/libltdl"
aclocaldir="$_lt_pkgdatadir/libltdl/m4"
Setting $_lt_pkgdatadir to the libtool directory will thus work (works for me - but only if the aclocal directory is in a subdirectory of libltdl named m4).
Given this, your sed solution seems quite sensible.
add a comment |
In the shell script libtoolize (version 2.4.2 and 2.4.6), four variables are hardcoded:
datadir=/usr/share
pkgdatadir=/usr/share/libtool
pkgltdldir=/usr/share/libtool
aclocaldir=/usr/share/aclocal
Soon afterwards there is the following section:
# Allow the user to override the master libtoolize repository:
if test -n "$_lt_pkgdatadir"; then
pkgltdldir="$_lt_pkgdatadir"
pkgdatadir="$_lt_pkgdatadir/libltdl"
aclocaldir="$_lt_pkgdatadir/libltdl/m4"
Setting $_lt_pkgdatadir to the libtool directory will thus work (works for me - but only if the aclocal directory is in a subdirectory of libltdl named m4).
Given this, your sed solution seems quite sensible.
add a comment |
In the shell script libtoolize (version 2.4.2 and 2.4.6), four variables are hardcoded:
datadir=/usr/share
pkgdatadir=/usr/share/libtool
pkgltdldir=/usr/share/libtool
aclocaldir=/usr/share/aclocal
Soon afterwards there is the following section:
# Allow the user to override the master libtoolize repository:
if test -n "$_lt_pkgdatadir"; then
pkgltdldir="$_lt_pkgdatadir"
pkgdatadir="$_lt_pkgdatadir/libltdl"
aclocaldir="$_lt_pkgdatadir/libltdl/m4"
Setting $_lt_pkgdatadir to the libtool directory will thus work (works for me - but only if the aclocal directory is in a subdirectory of libltdl named m4).
Given this, your sed solution seems quite sensible.
In the shell script libtoolize (version 2.4.2 and 2.4.6), four variables are hardcoded:
datadir=/usr/share
pkgdatadir=/usr/share/libtool
pkgltdldir=/usr/share/libtool
aclocaldir=/usr/share/aclocal
Soon afterwards there is the following section:
# Allow the user to override the master libtoolize repository:
if test -n "$_lt_pkgdatadir"; then
pkgltdldir="$_lt_pkgdatadir"
pkgdatadir="$_lt_pkgdatadir/libltdl"
aclocaldir="$_lt_pkgdatadir/libltdl/m4"
Setting $_lt_pkgdatadir to the libtool directory will thus work (works for me - but only if the aclocal directory is in a subdirectory of libltdl named m4).
Given this, your sed solution seems quite sensible.
answered Feb 5 at 16:43
fsbooksfsbooks
1
1
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1330044%2fhow-to-run-autotools-from-a-nonstandard-directory%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
First thing I'd try is to look for
pkgltdldir
in the scripts, see how this variable gets set, see if it doesn't depend on some kind of prefix variable, and then set the prefix variable first.– dirkt
Jun 11 '18 at 8:04
1
I used sed to replace all occurrences of "/usr/share" with my path in the Perl script libtoolize. It's not a clean solution but it works.
– Machta
Jun 11 '18 at 11:16