Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Command ar not found #210

Closed
FROGGS opened this Issue · 13 comments

2 participants

Tobias Leich kmx
Tobias Leich
Owner

ar is found when running configure, but later is missing when running make.

Do we have to add that PATH stuff to make command too?

Configuring package 'SDL'...
(cmd: PATH="/export/home/cpantest/.cpan/build/Alien-SDL-1.428_5-yjnZIO/sharedir/1.428_5_6faa3310/bin:$PATH:/usr/ccs/bin:/usr/xpg4/bin:/usr/sfw/bin:/usr/xpg6/bin:/usr/bin" ./configure --prefix=...")
[...]
checking for ar... ar
[...]
Running make install SDL...
(cmd: make install)
[...]
./libtool: line 963: ar: command not found
´´´
Tobias Leich FROGGS was assigned
kmx
Collaborator
kmx commented

I guess using:

PATH=/blex/blex:$PATH:/blex/blex/bin:/blex/bin make install

should do the trick.

Tobias Leich
Owner

Hmmmm, I did this and made a dev release:

PerlGameDev/Alien-SDL@26c31bc

Because configure does find it... Google tells me that ar should be in /usr/ccs/bin.

Where do you get that blex from?

kmx
Collaborator
kmx commented

"blex" was just a placeholder

Of course it sould be:

PATH=[exactly_the_same_values_as_by_configure] make install

Tobias Leich
Owner

Meh, who should ever know that? ;o)

kmx
Collaborator
kmx commented

The difference between calling ./configure and make install is:

1/ system('PATH=/path/to/some/dir ./configure --param=x')

2/ system('PATH=/path/to/some/dir', 'make', 'install')

(sorry for not having a look at source code before)

The case 1/ works as it is executed via shell, the second one fails as it tries "direct execution" and "PATH=..." is obviously not correct command.

Workaround might be (untested):

{
  ...
  my @cmd = ($self->_get_make, 'install');
  local $ENV{PATH};
  if ($^O eq 'solaris') {
    my $extra_PATH = "";
    for (qw[/usr/ccs/bin /usr/xpg4/bin /usr/sfw/bin /usr/xpg6/bin /usr/gnu/bin /opt/gnu/bin /usr/bin]) {
      $extra_PATH .= ":$_" if -d $_;
    }
    $ENV{PATH}="$PATH$extra_PATH";
  }
  $self->do_system(@cmd);
  ...
}
Tobias Leich
Owner

Why do I have to make $ENV{PATH} local?

Shouldnt it work to set $ENV{PATH} right before calling configure? (the make call is in the same sub).

Its a pity that my solaris vm wont boot...

kmx
Collaborator
kmx commented

after making $ENV{PATH} local you do not need to care about restoring the original value

You are right, you can set $ENV{PATH} before calling ./configure and it shoud do the same job (my guess) as calling "PATH=[value] ./configure --praram=[value]"

Tobias Leich
Owner

Great! So I will put that before ./configure and make it local.

Tobias Leich
Owner

Okay, I didnt made it local now, since when I make it local the content is gone.

I made a dev release right now btw. I guess we will see in 24h if it works or not.

Thanks so far buddy!

kmx
Collaborator
kmx commented

Okay, I didnt made it local now, since when I make it local the content is gone.

This is strange - perhaps something like this is necessary:

{
  my $orig_PATH = $ENV{PATH};
  local $ENV{PATH};
  ...
  $ENV{PATH}="$orig_PATH$extra_PATH";
  ...
}
Tobias Leich
Owner

Ya, that should work.

I will change it with next release.

Tobias Leich FROGGS closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.