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

julia doesn't build on Fedora 16 #434

Closed
jchia opened this issue Feb 21, 2012 · 9 comments
Closed

julia doesn't build on Fedora 16 #434

jchia opened this issue Feb 21, 2012 · 9 comments
Labels
domain:building Build system, or building Julia or its dependencies

Comments

@jchia
Copy link

jchia commented Feb 21, 2012

I got the following error:

config.status: executing tools/sample/Makefile commands
llvm[3]: Compiling APFloat.cpp for Release build
In file included from APFloat.cpp:15:
In file included from /home/josh.chia/julia/external/llvm-3.0/include/llvm/ADT/APFloat.h:104:
In file included from /home/josh.chia/julia/external/llvm-3.0/include/llvm/ADT/APInt.h:18:
In file included from /home/josh.chia/julia/external/llvm-3.0/include/llvm/ADT/ArrayRef.h:13:
In file included from /home/josh.chia/julia/external/llvm-3.0/include/llvm/ADT/SmallVector.h:18:
In file included from /usr/include/c++/4.6.2/algorithm:61:
/usr/include/c++/4.6.2/bits/stl_algobase.h:378:43: error: unexpected type name '_ValueTypeI':
expected expression
const bool __simple = (__is_trivial(_ValueTypeI)
^
/usr/include/c++/4.6.2/bits/stl_algobase.h:383:40: error: non-type template argument of type
'const bool' is not an integral constant expression
return std::__copy_move<_IsMove, __simple,
^~~~~~~~
...

Apparently CLANG has som problems. Is there a way to not use CLANG? If not, how do we fix this error? I'm on commit 3c3e0a of julia.

@g2boojum
Copy link

Looks like there's an upstream bug for this: https://bugzilla.redhat.com/show_bug.cgi?id=729308.

@JeffBezanson
Copy link
Sponsor Member

Thanks for tracking that down. Is clang the default compiler on fedora 16?

@g2boojum
Copy link

I assume that gcc is, but I'm not sure.

@JeffBezanson
Copy link
Sponsor Member

USECLANG=0 is the default for us, so gcc should work. @jchia can you try gcc?

@StefanKarpinski
Copy link
Sponsor Member

We should also make sure to work with Clang, but this appears to be a Clang bug rather than us doing something wrong.

@jckarter
Copy link

Clang++ is kind of sensitive in its libstdc++ compatibility. If Fedora also ships with LLVM's libc++, you might try installing that and building with clang++ -stdlib=libc++ instead.

@jchia
Copy link
Author

jchia commented Feb 22, 2012

In my Make.inc, I already have USEGCC=1, USECLANG=0. I'm not sure how to keep clang out of the picture. Here's a bigger context of the error messages:

$ make
checking for clang... clang
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether clang accepts -g... yes
...
config.status: executing projects/Makefile commands
config.status: executing bindings/Makefile commands
config.status: executing bindings/ocaml/Makefile.ocaml commands
=== configuring in projects/sample (/home/josh.chia/julia/external/llvm-3.0/projects/sample)
configure: running /bin/sh ./configure '--prefix=/home/josh.chia/julia/external/root' '--disable-threads' '--enable-optimized' '--disable-profiling' '--disable-assertions' '--enable-shared' '--enable-targets=x86,x86_64' '--disable-bindings' '--disable-docs' --cache-file=/dev/null --srcdir=.
configure: creating ./config.status
config.status: creating Makefile.common
config.status: executing setup commands
config.status: executing Makefile commands
config.status: executing lib/Makefile commands
config.status: executing lib/sample/Makefile commands
config.status: executing tools/Makefile commands
config.status: executing tools/sample/Makefile commands
llvm[3]: Compiling APFloat.cpp for Release build
In file included from APFloat.cpp:15:
In file included from /home/josh.chia/julia/external/llvm-3.0/include/llvm/ADT/APFloat.h:104:
In file included from /home/josh.chia/julia/external/llvm-3.0/include/llvm/ADT/APInt.h:18:
In file included from /home/josh.chia/julia/external/llvm-3.0/include/llvm/ADT/ArrayRef.h:13:
In file included from /home/josh.chia/julia/external/llvm-3.0/include/llvm/ADT/SmallVector.h:18:
In file included from /usr/include/c++/4.6.2/algorithm:61:
/usr/include/c++/4.6.2/bits/stl_algobase.h:378:43: error: unexpected type name '_ValueTypeI':
expected expression
const bool __simple = (__is_trivial(_ValueTypeI)
^

@JeffBezanson
Copy link
Sponsor Member

Ah, this gives me an idea. Try making this change:

diff --git a/external/Makefile b/external/Makefile
index baff743..d43607d 100644
--- a/external/Makefile
+++ b/external/Makefile
@@ -69,7 +69,7 @@ llvm-$(LLVM_VER)/configure: llvm-$(LLVM_VER).tar.gz
        touch $@
 $(LLVM_OBJ_SOURCE): llvm-$(LLVM_VER)/configure
        cd llvm-$(LLVM_VER) && \
-       ./configure --prefix=$(abspath $(EXTROOT)) --disable-threads --enable-optimized --disable-profiling --disable-assertions --enable-shared --enable-targets=x86,x86_64 --disable-bindings --disable-docs && \
+       ./configure --prefix=$(abspath $(EXTROOT)) --disable-threads --enable-optimized --disable-profiling --disable-assertions --enable-shared --enable-targets=x86,x86_64 --disable-bindings --disable-docs CC=gcc CXX=g++ && \
        $(MAKE)
 $(LLVM_OBJ_TARGET): $(LLVM_OBJ_SOURCE)
        $(MAKE) -C llvm-$(LLVM_VER) install

I added CC=gcc CXX=g++ to the configure command for llvm.

@jchia
Copy link
Author

jchia commented Feb 23, 2012

Jeff's patch seems to work. I could build and start Julia.

cmcaine pushed a commit to cmcaine/julia that referenced this issue Nov 11, 2022
Keno pushed a commit that referenced this issue Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:building Build system, or building Julia or its dependencies
Projects
None yet
Development

No branches or pull requests

5 participants