New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove explicit paths, and gnutar assumption #5493

Merged
merged 3 commits into from Jan 27, 2014

Conversation

6 participants
@qbit
Copy link
Contributor

qbit commented Jan 23, 2014

This diff brings julia closer to building on OpenBSD which does not have gnutar installed by default.

wget and friends are all in (usually) /usr/local/bin - so we ask the system where it has them. They could also be replaced with ftp(1) which supports http

@staticfloat

This comment has been minimized.

Copy link
Member

staticfloat commented Jan 24, 2014

Aha, I had been meaning to change jldownload in just that way. Nice.

Rather than basing your search for tar or gtar on $(OS), let's just search for tar, if it's not found search for gtar, and if THAT'S not found, throw an error informing the user as to what's missing. Go ahead and set $(TAR) in Make.inc as well, so we can use it everywhere. (It will get used in other files as well, like here so go ahead and replace as many instances as you can find)

@qbit

This comment has been minimized.

Copy link
Contributor

qbit commented Jan 24, 2014

The problem with just searching for tar is that on OpenBSD you will find it, but it isn't gnu tar, it's the built in version that does not support things like strip-components. Any suggestions for a different approach? Maybe check for gtar first?

went with check for gtar first

I will re-do the rest of the stuff and move it to Make.inc

@staticfloat

This comment has been minimized.

Copy link
Member

staticfloat commented Jan 24, 2014

Yes. Let's search for gtar first, since we really do want the gnu tar.
On Jan 24, 2014 6:54 AM, "Aaron Bieber" notifications@github.com wrote:

The problem with just searching for tar is that on OpenBSD you will find
it, but it isn't gnu tar, it's the built in version that does not support
things like strip-components. Any suggestions for a different approach?
Maybe check for gtar first?

I will re-do the rest of the stuff and move it to Make.inc


Reply to this email directly or view it on GitHubhttps://github.com//pull/5493#issuecomment-33228602
.

@StefanKarpinski

This comment has been minimized.

Copy link
Member

StefanKarpinski commented Jan 24, 2014

Two things:

  1. Is GNU tar really necessary? Can we avoid being tied to it?
  2. If it is, then if gtar doesn't exist, we should grep tar --version for GNU tar to and bail out otherwise.
@staticfloat

This comment has been minimized.

Copy link
Member

staticfloat commented Jan 24, 2014

Actually, I use bsdtar on my Mac and it works just fine:

$ tar --version
bsdtar 2.8.3 - libarchive 2.8.3

It even supports --strip-components. Perhaps your bsdtar is too old, @qbit?

@StefanKarpinski

This comment has been minimized.

Copy link
Member

StefanKarpinski commented Jan 24, 2014

Yeah, I also use bsdtar and it's fine.

@qbit

This comment has been minimized.

Copy link
Contributor

qbit commented Jan 24, 2014

OpenBSD uses this: http://www.openbsd.org/cgi-bin/cvsweb/src/bin/pax/tar.c , so not a matter of being out of date, it's just not bsdtar or gnutar.

@staticfloat

This comment has been minimized.

Copy link
Member

staticfloat commented Jan 24, 2014

Amazing that OpenBSD doesn't use bsdtar. Awesome.

In that case, I think we're just going to have to live with searching for
gtar first, then using tar as a last resort. We could search for bsdtar or
GNU tar in tar --version and throw an error if it doesn't exist in that
case.

On Fri, Jan 24, 2014 at 12:46 PM, Aaron Bieber notifications@github.comwrote:

OpenBSD uses this: http://www.openbsd.org/cgi-bin/cvsweb/src/bin/pax/tar.c, so not a matter of being out of date, it's just not
bsdtar or gnutar.


Reply to this email directly or view it on GitHubhttps://github.com//pull/5493#issuecomment-33259118
.

@juanfra684

This comment has been minimized.

Copy link

juanfra684 commented Jan 25, 2014

Just to clarify. You're using the tar version included with libarchive and it's named "bsdtar". It has not relation with any BSD, it's just a name.

OpenBSD uses a tar version derived from the original BSD tar. Also OpenBSD includes GNU tar and libarchive bsdtar as packages.

@staticfloat

This comment has been minimized.

Copy link
Member

staticfloat commented Jan 25, 2014

Looks good to me, but it seems there is a merge conflict now, as someone else has modified one of the files you've touched. Please git pull --rebase origin master, fix the merge conflicts and git push -f to push your rebased branch up again.

@JeffBezanson

This comment has been minimized.

Copy link
Member

JeffBezanson commented Jan 27, 2014

@staticfloat ok to merge now?

@staticfloat

This comment has been minimized.

Copy link
Member

staticfloat commented Jan 27, 2014

The only thing I'm not certain about is this bit, should we be mapping amd64 to x86_64 so that all checks are consistent? I feel like we probably will miss the amd64 case in other places too, if we're missing it here.

@JeffBezanson

This comment has been minimized.

Copy link
Member

JeffBezanson commented Jan 27, 2014

Possible, but it's not too related to the rest of the pull request so it doesn't seem like that should hold it up.

@staticfloat staticfloat merged commit 58efb4d into JuliaLang:master Jan 27, 2014

1 check passed

default The Travis CI build passed
Details
@staticfloat

This comment has been minimized.

Copy link
Member

staticfloat commented Jan 27, 2014

Merged. @qbit, I reverted the amd64 line above, I'm going to submit a separate PR for that in a few minutes, I'll ping you when I do to make sure it addresses everything you need.

@scw

This comment has been minimized.

Copy link
Contributor

scw commented Jan 27, 2014

This breaks building on FreeBSD, and probably OS X -- bsdtar doesn't include strip-components in its help. I've added a patch in #5569. You also could check by explicit version numbers, I believe GNUtar got full support for the option in 1.15 (released 2004), and bsdtar in the version for FreeBSD 6.0 (also released 2004).

scw referenced this pull request in scw/julia Jan 27, 2014

Fix search for bsdtar
Using `tar --help` on `bsdtar` doesn't show a `--strip-components` option like the GNU version (though it does show in the man page. Instead, explicitly check either for `strip-components` or `bsdtar`, which has supported strip-components for the same timeframe as GNU tar, with full support ~2006 for both.
@staticfloat

This comment has been minimized.

Copy link
Member

staticfloat commented Jan 27, 2014

Aha, my mistake. I thought I saw it in --help, but I must have seen it in the manpage instead. Thanks for the quick fix, @scw!

@ghost

This comment has been minimized.

Copy link

ghost commented Jun 11, 2016

@qbit Hi Aaron.
We fixed lots of portability issues with Julia while we tried to create an Alpine Linux package alpinelinux/aports#112
That's because Alpine doesn't use glibc or gnu coreutils (it's musl and busybox) so lots of glibc-specific functions were removed, bash scripts were made posix-compliant sh, etc. Maybe now you should give another try of compiling it on OpenBSD (remember to try the master branch with all fixes).
Good luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment