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

CI support #73

Closed
Keno opened this issue Jan 21, 2015 · 52 comments
Closed

CI support #73

Keno opened this issue Jan 21, 2015 · 52 comments

Comments

@Keno
Copy link
Collaborator

Keno commented Jan 21, 2015

LLVM has nightly APTs which might help.

@Keno Keno closed this as completed in 55c7a54 Mar 2, 2015
Keno added a commit that referenced this issue Mar 2, 2015
Add libraries to fix linkage under OS X Yosemite (fixes #73)
@Keno Keno reopened this Mar 2, 2015
@Keno
Copy link
Collaborator Author

Keno commented Jun 19, 2015

@staticfloat Do you suppose you could get me nightlies with julia in Cxx configuration?

@staticfloat
Copy link

I daresay I could. What platforms would you want?

@Keno
Copy link
Collaborator Author

Keno commented Jun 19, 2015

Ubuntu would be a great start, so I can get travis up.

@staticfloat
Copy link

It will probably be easier for me to get you them in .tar.gz format as opposed to .deb format. Seeing as that's what we use on Travis for nightlies anyway, will that be a problem? (The travis code snippet is showing that we just download a .tar.gz from status.julialang.org, unzip it and run with it)

@Keno
Copy link
Collaborator Author

Keno commented Jun 19, 2015

No, that should be fine.

@tkelman
Copy link

tkelman commented Jun 19, 2015

We already have the nightly llvm-svn test builds, all it costs is some S3 space to also package them up and upload them. Just make sure that a failure to compile against llvm svn doesn't prevent the nominal-llvm-version nightlies from building :)

@staticfloat
Copy link

@Keno looks like the LLVM-svn build is failing due to Python 2.6.8 as opposed to 2.7..... is that normal? Even though I've defined LLDB_DISABLE_PYTHON=1?

@tkelman
Copy link

tkelman commented Jun 20, 2015

I saw some messages to that effect on llvmdev not that long ago, they have bumped the minimum requirement for building LLVM itself to 2.7. The LLDB flag has more to do with whether python is embedded into the debugger I think, but LLVM still needs Python to build its test suite. I believe the intent of increasing the minimum to 2.7 is to make their life a little easier to eventually port the test suite bits to be Python 3-compatible. Can we get 2.7 from devtoolset maybe?

edit: or just build it since it's only needed for building LLVM, we're already building GCC after all.

@staticfloat
Copy link

Can we get 2.7 from devtoolset maybe?

Nope, but we can build it. :P

EDIT: Aaaand, we are on the same wavelength.

@staticfloat
Copy link

Built Python 2.7, now we're getting this error log. It's long, but toward the bottom we get:

cp: cannot stat `/home/centos/buildbot/slave/package_cxx32/build/deps/llvm-svn/build_Release+Asserts/tools/clang/runtime/compiler-rt/clang_linux/builtins-i386/libcompiler_rt.a': No such file or directory
make[8]: *** [/home/centos/buildbot/slave/package_cxx32/build/deps/llvm-svn/build_Release+Asserts/Release+Asserts/lib/clang/3.7.0/lib/linux/libclang_rt.builtins-i386.a] Error 1

Any thoughts? The build process is here, with the important bits being:

LLVM_VER=svn
LLVM_ASSERTIONS=1
BUILD_LLVM_CLANG=1
BUILD_LLDB=1
USE_LLVM_SHLIB=1
LLDB_DISABLE_PYTHON=1

@tkelman
Copy link

tkelman commented Jun 20, 2015

I'm not sure what changed upstream relative to previous versions of LLVM (or why we haven't seen this earlier), but I suspect on 32 bit builds it needs http://compiler-rt.llvm.org/ to be put in the right place for some of the compiler intrinsics to work. We should probably expand deps/Makefile to add a BUILD_COMPILER_RT and BUILD_LLD options at some point.

If the 64 bit build worked, maybe start with that? Running Travis on a 32-bit build of Julia can't be done all that elegantly right now anyway.

@staticfloat
Copy link

I thought this happened on both 32 and 64-bit, but it turns out I'm running into a different error on 64-bit:

/home/centos/buildbot/slave/package_cxx64/build/deps/llvm-svn/tools/lldb/source/Host/common/File.cpp: In member function ‘lldb_private::Error lldb_private::File::Open(const char*, uint32_t, uint32_t)’:
/home/centos/buildbot/slave/package_cxx64/build/deps/llvm-svn/tools/lldb/source/Host/common/File.cpp:292:18: error: ‘O_CLOEXEC’ was not declared in this scope
         oflag |= O_CLOEXEC;
                  ^
make[9]: *** [/home/centos/buildbot/slave/package_cxx64/build/deps/llvm-svn/build_Release+Asserts/tools/lldb/source/Host/common/Release+Asserts/File.o] Error 1

@tkelman
Copy link

tkelman commented Jun 22, 2015

The 64 bit issue would appear to be since RHEL 5's kernel version predates the O_CLOEXEC flag - http://man7.org/linux/man-pages/man2/open.2.html says "since Linux 2.6.23," https://en.wikipedia.org/wiki/Red_Hat_Enterprise_Linux#RHEL_5 says it's using 2.6.18. This should maybe be reported upstream to the LLDB folks, RHEL5 is old but still theoretically supported until 2017 ("extended lifecycle" to 2020). Looking at http://lists.qt-project.org/pipermail/interest/2012-December/004907.html we might just try building with -DO_CLOEXEC=0 and see if that works.

@staticfloat
Copy link

Thanks for tracking that down, Tony. Just BTW, it looks like the nightly 32-bit LLVM-svn builder is running into the compiler_rt issue as well. Configuration changes here, buildbot job running here.

@tkelman
Copy link

tkelman commented Jun 23, 2015

Maybe upstream changed something in the build system. It looks like we currently are (should be) building compiler-rt when BUILD_LLVM_CLANG or however that's spelled is set, which Cxx does.

@staticfloat
Copy link

@Keno Looking through the LLVM source code, it looks like compiler-rt is explicitly removed from the make targets, so we're supposed to do something special to get it to compile:

$ grep compiler-rt deps/llvm-svn/build_Release+Asserts/projects/Makefile
# Don't build compiler-rt, it isn't designed to be built directly.
DIRS := $(filter-out compiler-rt,$(DIRS))

@tkelman
Copy link

tkelman commented Jul 5, 2015

The -DO_CLOEXEC=0 flag apparently isn't making it to the lldb build http://buildbot.e.ip.saba.us:8010/builders/package_cxx64/builds/98/steps/make%20binary-dist/logs/stdio

@staticfloat
Copy link

I'm trying putting it into CPPFLAGS, as opposed to DEPS_CXXFLAGS.

@tkelman
Copy link

tkelman commented Jul 6, 2015

I'm going to guess that lldb is just not set up correctly wrt build flags when you use autotools to build llvm.

@staticfloat
Copy link

Welp, the new stuff worked, but now we get this;

.../tools/lldb/source/Host/posix/FileSystem.cpp:21:25: fatal error: linux/magic.h: No such file or directory compilation terminated.

I have the kernel-devel package installed, but it puts magic.h at /usr/include/, not /usr/include/linux. Furthermore, the symbols it's trying to pull in (CIFS_MAGIC_NUMBER and friends) aren't defined in this version of magic.h. I'm of the opinion that lldb just doesn't support CentOS 5, so I'm going to try switching it over to being built on Ubuntu 12.04.

@tkelman
Copy link

tkelman commented Jul 8, 2015

The selected GCC C++ compiler is not new enough to build LLVM. Please upgrade to GCC 4.7

@staticfloat
Copy link

Yep, workin' on it. :)

@staticfloat
Copy link

I have to figure out why ld built from my binutils is complaining about not having a sysroot, whatever that is.

@tkelman
Copy link

tkelman commented Jul 13, 2015

@staticfloat I don't think we want a source build of gcc 5.1.0 to be used on the non-cxx ubuntu 12.04 builders, do we? http://buildbot.e.ip.saba.us:8010/builders/build_ubuntu12.04-x64/builds/1994/steps/shell_1/logs/stdio

@staticfloat
Copy link

Whether we want it or not, gcc-5.1.0 isn't working like we want it to, so I'm removing it until I can get it working properly. Looks like I might need to build glibc to get pthreads working.

@tkelman
Copy link

tkelman commented Jul 18, 2015

We haven't had nightlies for 6 days, and given that package precompilation was just merged and a release candidate will probably be tagged soonish, I think it's more important to get the buildbots back in regular working order and revisit Cxx nightlies after 0.4.0 is out.

@staticfloat
Copy link

I'm coming back at this again, now that I've worked through the rest of my buildbot maintenance backlog. :) I'm going to try building these guys on the CentOS 5 builders again now that I've built Python 2.7 on them.

@staticfloat
Copy link

Currently trying on CentOS 6

@staticfloat
Copy link

binutils 2.25, GCC 5.1 and git 2.5.3 all custom-built in order to get a solid build environment. Build ongoing, let's see how it shakes out.

@staticfloat
Copy link

Nope, looks like we need python too. :)

@staticfloat
Copy link

Python 2.7.10 built and running. The show goes on.

@staticfloat
Copy link

Ran into a glibc problem where the new GCC I'm using (5.1) used a super-new version of glibc while building LLVM, which failed when it tried to run llvm-tblgen since it used the host system's libstdc++, which was obviously incompatible. I've since set LD_LIBRARY_PATH such that the new GCC's libraries are being used first, if this compiles all the way, I'll ensure that the correct libraries get bundled up with make binary-dist and we'll see if this is as portable as we hope! The show goes on.

@staticfloat
Copy link

So I got it working once. That archive works, except that it doesn't bundle libedit.so.0, which is a problem. I tried to fix that via this branch, but LLVM doesn't seem to find the header files that it needs, even though I know they are installed to $prefix/usr/include. Any ideas on how I can make the build process automatically hint to LLVM that it should search in the proper include directories? I suppose I could tack it onto CPPFLAGS, but I would have thought LLVM should be searching its own install prefix anyway.

@staticfloat
Copy link

It looks like (modulo LLVM-svn breakage) this builder has been succeeding every now and then. Just marking this down as "kinda-sorta-working" so that we know what the state of things are once we decide to pick this up again.

@Keno
Copy link
Collaborator Author

Keno commented Oct 26, 2015

I'm planning to start supporting at least some version of 0.4 with some version of Cxx. After my backports go in, could we have binaries of 0.4.1 (whenver that comes out) that include everything necessary to get Cxx running.

@staticfloat
Copy link

Yep, we'll make sure of it.

@Keno
Copy link
Collaborator Author

Keno commented Nov 1, 2015

Can we switch the buildbot to the kf/gallium LLVM branches, or at least have one that does, so we can track regressions in julia that cause Cxx.jl to fail?

@tkelman
Copy link

tkelman commented Nov 1, 2015

@staticfloat
Copy link

Is there a make variable that I can set to check out a particular branch?

@Keno
Copy link
Collaborator Author

Keno commented Nov 1, 2015

override LLVM_GIT_URL_LLVM=https://github.com/JuliaLang/llvm.git
override LLVM_GIT_URL_LLDB=https://github.com/JuliaLang/lldb.git
override LLVM_GIT_URL_CLANG=https://github.com/JuliaLang/clang.git
override LLVM_GIT_VER=kf/gallium
override LLVM_GIT_VER_LLDB=kf/gallium
override LLVM_GIT_VER_CLANG=kf/gallium

@staticfloat
Copy link

@Keno
Copy link
Collaborator Author

Keno commented Nov 1, 2015

Thanks!

@staticfloat
Copy link

I've forced a build to ensure that I don't have a syntax error or something.

@staticfloat
Copy link

Welp, that didn't take long;

/home/centos/buildbot/slave/nightly_cxx64/build/deps/jldownload /home/centos/buildbot/slave/nightly_cxx64/build/deps/srccache/llvm-kf/gallium.src.tar.xz http://llvm.org/releases/kf/gallium/gallium.src.tar.xz

@staticfloat
Copy link

I need to tell the Makefiles that LLVM should be downloaded over git, right?

@Keno
Copy link
Collaborator Author

Keno commented Nov 1, 2015

LLVM_VER should still be svn

@Keno
Copy link
Collaborator Author

Keno commented Nov 1, 2015

LLVM_GIT_VER is for the branch

@Keno
Copy link
Collaborator Author

Keno commented Nov 1, 2015

Also, the git repository is pretty big (1.5ish GB), maybe we should add the option to make a shallow checkout?

@tkelman
Copy link

tkelman commented Nov 2, 2015

was fixed upstream, llvm-mirror/lldb@b49efe0 needs to be cherry-picked or rebased in to your lldb branch

@tkelman
Copy link

tkelman commented Nov 9, 2015

Bump, you need to fix lldb so it builds with gcc 5, your last rebase was at a broken point in the upstream history.

@Keno
Copy link
Collaborator Author

Keno commented Jul 21, 2016

Travis is setup now.

@Keno Keno closed this as completed Jul 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants