Can't build on CentOS 6.4 #5587

Closed
timholy opened this Issue Jan 28, 2014 · 15 comments

Projects

None yet

3 participants

@timholy
Member
timholy commented Jan 28, 2014

(I hate CentOS, the software is friggin' old)

$ make clean && make
...
    CC src/jlapi.o
    CC src/profile.o
    CC src/gc.o
    LINK usr/lib/libjulia.so
    PERL base/pcre_h.jl
    PERL base/errno_h.jl
    PERL base/build_h.jl.phony
    PERL base/fenv_constants.jl
    PERL base/file_constants.jl
    PERL base/uv_constants.jl
usage: git rev-list [OPTION] <commit-id>... [ -- paths... ]
  limiting output:
    --max-count=nr
...
  special purpose:
    --bisect
    --bisect-vars
    --bisect-all
    PERL base/version_git.jl.phony
    CC ui/repl.o
    CC ui/repl-readline.o
    LINK usr/bin/julia-readline
    CC ui/repl-basic.o
    LINK usr/bin/julia-basic
version_git.jl
error during bootstrap: LoadError(at "sysimg.jl" line 26: LoadError(at "version_git.jl" line 13: ErrorException("syntax: unexpected ,")))
make[1]: *** [/home/tim/src/julia/usr/lib/julia/sys0.bc] Error 1
make: *** [release] Error 2

git bisect blames f7c19cb. CC @ivarne.

Here are the contents of my version_git.jl:

# This file was autogenerated in base/version_git.sh
immutable GitVersionInfo
    commit::String
    commit_short::String
    branch::String
    build_number::Int
    date_string::String
    tagged_commit::Bool
    fork_master_distance::Int
    fork_master_timestamp::Float64
end

const GIT_VERSION_INFO = GitVersionInfo(
    "f7c19cb7ece4df531bf8a9ec5e7ca07860378722",
    "f7c19cb*",
    "(no branch)",
    ,
    "2014-01-25 11:00 UTC",
    false,
    ,
    1390647656.
)
@timholy
Member
timholy commented Jan 28, 2014

Git version is 1.7.1

@ivarne
Collaborator
ivarne commented Jan 28, 2014

Sorry. I'll fix this. The best is probably to emit -1 for the numbers, so that users might notice that there is an error, but it will not break the build.

What is your output from git rev-list --count HEAD ^v0.2.0 and git rev-list --count HEAD ^master.

@ivarne ivarne added a commit to ivarne/julia that referenced this issue Jan 28, 2014
@ivarne ivarne Fix #5587 (quickfix)
Check that the numbers from git are not empty strings before pasting
them into `version_git.jl`.
334e99d
@timholy
Member
timholy commented Jan 28, 2014

git doesn't seem to like that syntax:

$ git rev-list --count HEAD ^v0.2.0
usage: git rev-list [OPTION] <commit-id>... [ -- paths... ]
  limiting output:
    --max-count=nr
    --max-age=epoch
    --min-age=epoch
    --sparse
    --no-merges
    --remove-empty
    --all
    --branches
    --tags
    --remotes
    --stdin
    --quiet
  ordering output:
    --topo-order
    --date-order
    --reverse
  formatting output:
    --parents
    --children
    --objects | --objects-edge
    --unpacked
    --header | --pretty
    --abbrev=nr | --no-abbrev
    --abbrev-commit
    --left-right
  special purpose:
    --bisect
    --bisect-vars
    --bisect-all

and the same for master.

@ivarne
Collaborator
ivarne commented Jan 28, 2014

I submitted a quickfix

Instead of --count, we can do git rev-list HEAD ^v0.2.0 | wc -l | sed "s/[^0-9]*//g". Does that give reasonable results for you?

@ivarne
Collaborator
ivarne commented Jan 28, 2014

It seems like the --count option was added in 1.7.6, which is 3 years old. How old versions of git do we support for Pkg?

@timholy
Member
timholy commented Jan 28, 2014
$ git rev-list HEAD ^v0.2.0 | wc -l | sed "s/[^0-9]*//g"
1280

So that seems to work. (Will all platforms have wc and sed installed?)

I manually applied your quickfix, but it didn't seem to change anything.

@StefanKarpinski
Member

If we start shipping with libgit2, this sort of thing will be ameliorated.

@timholy
Member
timholy commented Jan 28, 2014

It seems like the --count option was added in 1.7.6, which is 3 years old. How old versions of git do we support for Pkg?

That's the annoying thing about CentOS: its software is really old by the time it is released (CentOS 6.4 was released in 2013). So you can have a quite-new distro (which you'd presumably like to support) running old software.

For the record, Pkg seems to work fine on this machine.

@timholy
Member
timholy commented Jan 28, 2014

@ivarne, when I said that your quickfix didn't help, I didn't notice some new errors:

version_git.sh: line 54: build_number: command not found
version_git.sh: line 57: fork_master_distance: command not found
    PERL base/version_git.jl.phony
/bin/sh: line 3: 10215 Segmentation fault      (core dumped) /home/tim/src/julia/usr/bin/julia-readline --build /home/tim/src/julia/usr/lib/julia/sys -J/home/tim/src/julia/usr/lib/julia/$([ -e /home/tim/src/julia/usr/lib/julia/sys.ji ] && echo sys.ji || echo sys0.ji) -f sysimg.jl
*** This error is usually fixed by running 'make clean'. If the error persists, try 'make cleanall'. ***
make[1]: *** [/home/tim/src/julia/usr/lib/julia/sys.bc] Error 1
make: *** [release] Error 2
@ivarne
Collaborator
ivarne commented Jan 28, 2014

@timholy I pushed a new fix. It seems like sh does not approve of my use of spaces around = in assignments. I was in a hurry this morning, but wanted to fix the problem i caused. I'll try to be more diligent before pushing in the future.

We already depend on sed, and we have as since before I joined Julia last summer. I would be surprised if someone have a build system for Julia that does not have wc, but I am not an expert on strange systems. I only have OSX and Ubuntu.

@StefanKarpinski Using libgit2 from Julia would require the version_git.jl file generation to happen after sysimg is built, but the version file is included in the sysimg, so the order of events might cause problems.

@timholy
Member
timholy commented Jan 28, 2014

That fixes it, thanks!

With regards to the other change, in the absence of information to the contrary I now withdraw my concerns about sed and wc. If you want to implement that, no objections from me.

@timholy
Member
timholy commented Jan 28, 2014

@ivarne, your "pushes" are going to your private fork, not Julia master. You'll want to merge at some point.

@ivarne
Collaborator
ivarne commented Jan 28, 2014

@timholy Sorry, but that is kind of a consequence of not having push access to Julia master. If you review and merge #5590, you will get the fix into master.

@timholy timholy pushed a commit that closed this issue Jan 28, 2014
@ivarne ivarne Fix #5587 (quickfix)
Check that the numbers from git are not empty strings before pasting
them into `version_git.jl`.
f90a976
@timholy timholy closed this in f90a976 Jan 28, 2014
@timholy
Member
timholy commented Jan 28, 2014

Sorry, didn't realize it was a PR.

@ivarne
Collaborator
ivarne commented Jan 28, 2014

Hehe, now I realised that I had only linked the commit and not the PR, so you are kind of excused.

@mschauer mschauer added a commit to mschauer/julia that referenced this issue Jan 28, 2014
@ivarne ivarne Fix #5587 (quickfix)
Check that the numbers from git are not empty strings before pasting
them into `version_git.jl`.
d9665f9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment