Skip to content

Error in make with libuv with uv_rwlock_t #2502

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

Closed
GlenHertz opened this issue Mar 7, 2013 · 26 comments
Closed

Error in make with libuv with uv_rwlock_t #2502

GlenHertz opened this issue Mar 7, 2013 · 26 comments
Assignees
Labels
building Build system, or building Julia or its dependencies upstream The issue is with an upstream dependency, e.g. LLVM

Comments

@GlenHertz
Copy link
Contributor

Hi,

On 0.1.1 tag and master I get the following make error:

In file included from /home/user/RedHatEnterpriseWS6/julia-master/deps/libuv/include/uv.h:67,
                 from src/unix/async.c:25:
/home/user/RedHatEnterpriseWS6/julia-master/deps/libuv/include/uv-private/uv-unix.h:132: error: expected ¡=¢, ¡,¢, ¡;¢, ¡asm¢ or ¡__attribute__¢ before ¡uv_rwlock_t¢
/home/user/RedHatEnterpriseWS6/julia-master/deps/libuv/include/uv-private/uv-unix.h:149: error: expected ¡=¢, ¡,¢, ¡;¢, ¡asm¢ or ¡__attribute__¢ before ¡uv_barrier_t¢
In file included from src/unix/async.c:25:
/home/user/RedHatEnterpriseWS6/julia-master/deps/libuv/include/uv.h:353: warning: ¡struct addrinfo¢ declared inside parameter list
/home/user/RedHatEnterpriseWS6/julia-master/deps/libuv/include/uv.h:1856: error: expected ¡)¢ before ¡*¢ token
/home/user/RedHatEnterpriseWS6/julia-master/deps/libuv/include/uv.h:1857: error: expected ¡)¢ before ¡*¢ token
/home/user/RedHatEnterpriseWS6/julia-master/deps/libuv/include/uv.h:1858: error: expected ¡)¢ before ¡*¢ token
/home/user/RedHatEnterpriseWS6/julia-master/deps/libuv/include/uv.h:1859: error: expected ¡)¢ before ¡*¢ token
/home/user/RedHatEnterpriseWS6/julia-master/deps/libuv/include/uv.h:1860: error: expected ¡)¢ before ¡*¢ token
/home/user/RedHatEnterpriseWS6/julia-master/deps/libuv/include/uv.h:1861: error: expected ¡)¢ before ¡*¢ token
/home/user/RedHatEnterpriseWS6/julia-master/deps/libuv/include/uv.h:1862: error: expected ¡)¢ before ¡*¢ token
/home/user/RedHatEnterpriseWS6/julia-master/deps/libuv/include/uv.h:1863: error: expected ¡)¢ before ¡*¢ token
/home/user/RedHatEnterpriseWS6/julia-master/deps/libuv/include/uv.h:1898: error: expected ¡)¢ before ¡*¢ token
/home/user/RedHatEnterpriseWS6/julia-master/deps/libuv/include/uv.h:1899: error: expected ¡)¢ before ¡*¢ token
/home/user/RedHatEnterpriseWS6/julia-master/deps/libuv/include/uv.h:1900: error: expected ¡)¢ before ¡*¢ token
In file included from src/unix/internal.h:35,
                 from src/unix/async.c:26:
src/unix/linux-syscalls.h:129: warning: type defaults to ¡int¢ in declaration of ¡sigset_t¢
src/unix/linux-syscalls.h:129: error: expected ¡;¢, ¡,¢ or ¡)¢ before ¡*¢ token
src/unix/async.c: In function ¡uv__async_start¢:
src/unix/async.c:214: warning: implicit declaration of function ¡uv__make_pipe¢
make[3]: *** [src/unix/async.o] Error 1
make[2]: *** [libuv/libuv.a] Error 2
make[1]: *** [julia-release] Error 2
make: *** [release] Error 2

I tried both 1.1 branch and master and got the same error. I tried make -C deps/libuv clean; make and from a fresh install which didn't work.

Thanks,

Glen

@ghost ghost assigned vtjnash Mar 7, 2013
@mlubin
Copy link
Member

mlubin commented Mar 7, 2013

Potentially a compiler version issue. From what I can tell, RHEL 6.1 has GCC 4.4. The README recommends 4.6 or later.

@vtjnash
Copy link
Member

vtjnash commented Mar 7, 2013

This is really strange. From the log you posted, it seems you are missing sigset_t, pthread_rwlock_t, and pthread_barrier_t or that uv_rwlock_t and uv_barrier_t. This seems very unlikely.

Can you try

cd deps/libuv
make clean
git pull
git checkout master
make

and let me know if you get the same error?
(then delete the directory, or otherwise reset the state back to branch julia0.2)

@JeffBezanson
Copy link
Member

I love how we only have these problems with the enterprise linux distros.

@StefanKarpinski
Copy link
Member

That's because RHEL loves ancient compilers.

@nolta
Copy link
Member

nolta commented Mar 8, 2013

master compiles fine on Centos 5.9 w/ gcc 4.4, so it's probably not the compiler.

@GlenHertz
Copy link
Contributor Author

Hi,

@vtjnash, thanks for the pointers. The problem is in libuv and I ended up doing a bisect in deps/libuv and the result was:

01fe4e73a695587d7aacbb1a6b998807b7917f64 is the first bad commit

Julia0.2 is also bad. I also tried with gcc 4.7.2 and got an identical error message.

In Julia I did a bisection and the first bad commit is 1191032.

Hopefully those two line up. Let me know if you require more info and thanks for you help with this.

Glen

@vtjnash
Copy link
Member

vtjnash commented Mar 8, 2013

Alright, so it looks like it might be an upstream bug. That commit doesn't look like it changed anything other than renaming a variable. What is the output of
uname -s and echo $(OS)

@GlenHertz
Copy link
Contributor Author

Hi,

uname -s --> Linux
echo $OS --> RedHatEnterpriseWorkstation6.1

Glen

@vtjnash
Copy link
Member

vtjnash commented Mar 8, 2013

aha! any idea where that OS variable is coming from? Libuv is now using that variable to override the uname detection of the operating system

@GlenHertz
Copy link
Contributor Author

The OS env var was created by me and gets set in my shell startup scripts. If I unset it, then it is OK. Why doesn't Libuv redefine it using = instead of ?=?

@vtjnash
Copy link
Member

vtjnash commented Mar 8, 2013

The intention is to allow the user to override it with their environment variables.
However, can you file an upstream bug report https://github.com/joyent/libuv/issues/new suggesting they use = instead of ?=?
You can point out that RedHat documentation indicates that this is a reserved environment variable: http://www.redhat.com/mirrors/LDP/LDP/intro-linux/html/sect_07_02.html

@GlenHertz
Copy link
Contributor Author

I added issue 737 to libuv. Thanks again.

@GlenHertz
Copy link
Contributor Author

Since this is an upstream issue I'm closing this and improving the title so people can find this easier in the future.

@pao
Copy link
Member

pao commented Mar 8, 2013

I believe we keep upstream bugs open until a fixed version is incorporated in Julia.

@pao pao reopened this Mar 8, 2013
@ViralBShah
Copy link
Member

In general, we should also avoid updating libraries in bugfix releases.

@JeffBezanson
Copy link
Member

But what if the library updates fix bugs??

@JeffBezanson
Copy link
Member

If this is a simple libuv makefile fix, we could add a local patch.

@vtjnash
Copy link
Member

vtjnash commented Mar 9, 2013

This can also be handled by the build errata: call unset OS before building julia

@ViralBShah
Copy link
Member

I suggest we should only carry out minor bugfix library updates in our bugfix releases. That is of course difficult with libuv as it is also a fast moving target. It is not good that a bugfix release does not build on computers where it previously used to.

@JeffBezanson
Copy link
Member

I don't think any policy would have changed this situation. There was a pretty bad bug, libuv had a fix, and we had no idea it would bring along build breakage. I guess what we could have done is cherry-picked the minimal libuv change that would solve the problem.

@vtjnash
Copy link
Member

vtjnash commented Mar 20, 2013

libuv folks renamed OS to PLATFORM upstream. just need to remember to fix & close this on the next libuv rebase

@JeffBezanson
Copy link
Member

Shall we rebase our libuv?

@JeffBezanson
Copy link
Member

Bump

@JeffBezanson
Copy link
Member

Bump

@vtjnash
Copy link
Member

vtjnash commented Apr 20, 2013

This patch is now in our libuv julia0.2 branch, just need to bump the sha1 in julia (and fix deps/Makefile libuv target)

@vtjnash
Copy link
Member

vtjnash commented Apr 27, 2013

issue #2502 closed by de0cb82

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 upstream The issue is with an upstream dependency, e.g. LLVM
Projects
None yet
Development

No branches or pull requests

8 participants