Skip to content
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

libuv failing build on 32-bit Centos 5 system #1689

Closed
kmsquire opened this issue Dec 6, 2012 · 22 comments
Closed

libuv failing build on 32-bit Centos 5 system #1689

kmsquire opened this issue Dec 6, 2012 · 22 comments
Labels
building Build system, or building Julia or its dependencies system:linux Affects only Linux

Comments

@kmsquire
Copy link
Member

kmsquire commented Dec 6, 2012

~/src/julia32/deps/libuv$ make
cc --std=c89 -pedantic -Wall -Wextra -Wno-unused-parameter -D_GNU_SOURCE -Iinclude -Iinclude/uv-private -Isrc -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g -c src/unix/async.c -o src/unix/async.o
In file included from src/unix/internal.h:37,
                 from src/unix/async.c:22:
src/unix/linux/syscalls.h:74: error: expected specifier-qualifier-list before ‘__u64’
make: *** [src/unix/async.o] Error 1

This actually happened with (I think) the last libuv update in julia, with (julia) commit a6e75e3, corresponding to libuv commit 0709538fecef54c67c84d446af7edddd3e4a1e99.

@kmsquire
Copy link
Member Author

kmsquire commented Dec 6, 2012

Is it better to report these here, or on JuliaLang/libuv?

@kmsquire
Copy link
Member Author

kmsquire commented Dec 6, 2012

More information: seems to be some commit upstream between node-v0.8.11 and node-v0.9.0

@kmsquire
Copy link
Member Author

kmsquire commented Dec 6, 2012

The culprit is joyent/libuv@f91e6be. The immediate error is fixed by removing --std=c89. I'm unsure how to do this... @nolta, do you know?

@kmsquire
Copy link
Member Author

kmsquire commented Dec 6, 2012

Okay, never mind, found it by grepping.

@StefanKarpinski
Copy link
Member

Epic self-conversation, but good work :-)

@kmsquire
Copy link
Member Author

kmsquire commented Dec 6, 2012

I've submitted JuliaLang/libuv#3 (which simply removes "--std=c89" from the libuv build). I'm not sure, though, if that is there for a reason. I can submit upstream to see what they say, instead--let me know. CC: @loladiro @vtjnash

@kmsquire
Copy link
Member Author

kmsquire commented Dec 6, 2012

(* embarassed laugh ensues... *)

@vtjnash
Copy link
Member

vtjnash commented Dec 6, 2012

Can you please check to see if this happens building from the most recent upstream sources from Joyent?

@kmsquire
Copy link
Member Author

kmsquire commented Dec 6, 2012

Yep. That's actually how I determined which upstream branch (by manual bisection---I really should figure out how to use git bisect).

~/src/julia32/deps/libuv$ git remote -v | grep upstream
upstream    https://github.com/joyent/libuv (fetch)
upstream    https://github.com/joyent/libuv (push)
~/src/julia32/deps/libuv$ git fetch upstream
~/src/julia32/deps/libuv$ git status
# On branch upstream-master
nothing to commit, working directory clean
~/src/julia32/deps/libuv$ git diff upstream/master
~/src/julia32/deps/libuv$ CC=gcc44 make
gcc44 --std=c89 -pedantic -Wall -Wextra -Wno-unused-parameter -D_GNU_SOURCE -Iinclude -Iinclude/uv-private -Isrc -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g -c src/unix/async.c -o src/unix/async.o
In file included from src/unix/internal.h:37,
                 from src/unix/async.c:22:
src/unix/linux/syscalls.h:74: error: expected specifier-qualifier-list before ‘__u64’
make: *** [src/unix/async.o] Error 1

@pao
Copy link
Member

pao commented Dec 6, 2012

git bisect is really easy!

# assume things aren't working now...
git bisect bad
# find a known good spot
git checkout XXXXX
run_tests
# tests passed? then...
git bisect good
# magic happens
run_tests
# ...

Then keep running either git bisect good or get bisect bad followed by the test; if the test returns a standard POSIX error code, you can use git bisect run run_tests and it will mark the commits good and bad automatically.

@kmsquire
Copy link
Member Author

kmsquire commented Dec 6, 2012

Thanks @pao!

@timholy
Copy link
Member

timholy commented Dec 6, 2012

For debugging problems in Julia itself, I keep this run_bisect.sh script around:

#! /bin/bash
# Instructions
# Create a .jl file that looks like this:
#        function test()
#           do some stuff, perhaps return a value
#        end
#        @assert test() == 5   # 5 is the correct answer if all is working
#        exit()
# Then provide the name of that function after the "julia" call below
make clean  # or cleanall if you need it
make
julia /tmp/test.jl
exit $?

Then you can do automatic bisection (see the last couple of lines here: http://git-scm.com/book/ch6-5.html). Have a nice meal while you wait.

@kmsquire
Copy link
Member Author

kmsquire commented Dec 6, 2012

That's also quite useful tim--thanks!

@ViralBShah
Copy link
Member

@timholy Your run_bisect.sh script would be good to have in contrib.

@timholy
Copy link
Member

timholy commented Dec 8, 2012

See commit 25c1ee2

@Keno
Copy link
Member

Keno commented Jan 5, 2013

@kmsquire Did you ever submit this upstream?

@kmsquire
Copy link
Member Author

kmsquire commented Jan 6, 2013

Not yet, sorry. I'm going to have very spotty internet access until next
week, so not sure I'll get to it until then, but I'll leave it on my todo
list.

On Sat, Jan 5, 2013 at 12:10 AM, Keno Fischer [email protected]:

@kmsquire https://github.com/kmsquire Did you ever submit this upstream?


Reply to this email directly or view it on GitHubhttps://github.com//issues/1689#issuecomment-11910157.

@kmsquire
Copy link
Member Author

Finally submitted upstream: joyent/libuv#685

@kmsquire
Copy link
Member Author

See JuliaLang/libuv#3 (comment)

@nolta
Copy link
Member

nolta commented Jan 30, 2013

This has been fixed upstream, can we close this?

@kmsquire
Copy link
Member Author

It's not fixed for julia yet, but there's an issue here: JuliaLang/libuv#5. I personally only use a 32-bit Centos machine when I'm testing portability of a patch. So it's not urgent to me that it's fixed, but I hope it happens before I need it again.

@ViralBShah
Copy link
Member

@vtjnash @loladiro Does our libuv now include this upstream patch for CentOS 5? Could one of you cherry-pick the relevant commit so that we can close this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
building Build system, or building Julia or its dependencies system:linux Affects only Linux
Projects
None yet
Development

No branches or pull requests

8 participants