Opened 10 years ago

Closed 10 years ago

#5475 closed enhancement (fixed)

LLVM-3.5.0

Reported by: ojab Owned by: christopher
Priority: normal Milestone: 7.6
Component: BOOK Version: SVN
Severity: normal Keywords:
Cc:

Description

Change History (25)

in reply to:  description comment:1 by christopher, 10 years ago

Replying to ojab:

http://llvm.org/releases/download.html#3.5.0

They have also added CMake to this release which *may* simplify the build instructions for the documentation and clang:

{{{Changes to CMake build system

Building and installing LLVM, Clang and lld sphinx documentation can now be done in CMake builds. If LLVM_ENABLE_SPHINX is enabled the “docs-<project>-html” and “docs-<project>-man” targets (e.g. docs-llvm-html) become available which can be invoked directly (e.g. make docs-llvm-html) to build only the relevant sphinx documentation. If LLVM_BUILD_DOCS is enabled then the sphinx documentation will also be built as part of the normal build. Enabling this variable also means that if the install target is invoked then the built documentation will be installed. See LLVM-specific variables. Both the Autoconf/Makefile and CMake build systems now generate LLVMConfig.cmake (and other files) to export installed libraries. This means that projects using CMake to build against LLVM libraries can now build against an installed LLVM built by the Autoconf/Makefile system. See Embedding LLVM in your project for details. Use of llvm_map_components_to_libraries() by external projects is deprecated and the new llvm_map_components_to_libnames() should be used instead.

}}}

in reply to:  2 comment:3 by christopher, 10 years ago

Replying to ojab:

Gallium build in Mesa-10.2 is broken, upstream fix: http://cgit.freedesktop.org/mesa/mesa/commit/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp?id=564821c917f4a9d5a0de2ee77b90b0cd85e3d3a6

It may be better to hold this off till 7.7 as if one thing is not working with the new version of clang etc then everything that we currently build against clang is going to have to be built and tested.

I am not sure how far away from freeze we are.

in reply to:  description ; comment:4 by christopher, 10 years ago

Replying to ojab:

http://llvm.org/releases/download.html#3.5.0

I have attempted to build this on 32bit and it failed. I have done a little research and have found a proposed patch that I have applied and am trying the build again. Apparently the breakage is only if you enable shared libraries, which I did for the purposes of testing by the book.

If this patch works I will work out how to add the lines by either a sed or by an awk command. There is only one line in two files to patch so a patch is overkill.

No point in me posting the link to said patch if it does not work.

Regards,

Christopher.

in reply to:  4 comment:5 by christopher, 10 years ago

Replying to cjg:

Replying to ojab:

http://llvm.org/releases/download.html#3.5.0

I have attempted to build this on 32bit and it failed. I have done a little research and have found a proposed patch that I have applied and am trying the build again. Apparently the breakage is only if you enable shared libraries, which I did for the purposes of testing by the book.

If this patch works I will work out how to add the lines by either a sed or by an awk command. There is only one line in two files to patch so a patch is overkill.

No point in me posting the link to said patch if it does not work.

Regards,

Christopher.

Okay with the patch applied the build completes successfully. I am now going to do it again and build the documentation and run the checks.

The first time it failed I was also building the documentation and it was at lest two hours into the build when it failed.

I found the link to the proposed patch on arch linux, though the link itself is to the llvm mailing list, and it is stated there that this is an attempt to fix the issue. Arch themselves split their package up and have dropped using gcc and make it build with a pre-installed clang until gcc works again with it.

The link is:

http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140616/222509.html

There are no deletions in any files just a single line inserted into two files.

Like I said, I will try a sed and or an awk to insert the lines into the files for the book.

I might as well do the stats for the package whilst I am at it, but I really feel that we are going to need to test everything that uses clang/llvm to make sure it works correctly.

Regards,

Christopher.

comment:6 by Fernando de Oliveira, 10 years ago

I cannot confirm problem building Mesa. Perhaps I'm missing something.

Used:

    ./autogen.sh CFLAGS='-O2' CXXFLAGS='-O2' \
              --prefix=$XORG_PREFIX          \
              --sysconfdir=/etc              \
              --enable-egl                   \
              --enable-gbm                   \
              --enable-gallium-egl           \
              --enable-gallium-gbm           \
              --enable-gallium-llvm          \
              --enable-shared-glapi          \
              --enable-glx-tls               \
              --enable-dri                   \
              --enable-glx                   \
              --enable-osmesa                \
              --enable-gles1                 \
              --enable-gles2                 \
              --enable-llvm-shared-libs      \
              --enable-texture-float         \
              --enable-openvg                \
              --enable-xa                    \
              --enable-vdpau                 \
              --enable-dri3                  \
              --with-egl-platforms='drm,x11' \
              --with-dri-drivers='i915,i965,r200,radeon,nouveau,swrast' \
              --with-gallium-drivers='nouveau,r300,r600,radeonsi,svga,swrast'

in reply to:  description comment:7 by christopher, 10 years ago

Replying to ojab:

http://llvm.org/releases/download.html#3.5.0

Well This beast compiled and installed. I must say at this point that I have tested it using the cmake build system. I wanted to see how the installer handled the documentation.

Without using the sed, the documentation gets installed in /usr/share/doc/llvm.

The build time for this including the test suite is way higher than what is currently published.

SBU=129.859

is what I get with using make -j1. That is including doxygen and shpinx and generating the html documentation as well.

If we do use the cmake build system for this it will simplify the page somewhat. I must also say that I cheated a little with regards to cmake. I used the gui for it as I did not know what to actually pass on the command line. It is all in CMakeCache.txt so its just a matter of adding those values that are used into the instructions and testing again.

I will do a normal autotools build and see what happens with regards to the documentation there.

Regards,

Christopher.

in reply to:  description comment:8 by christopher, 10 years ago

Replying to ojab:

http://llvm.org/releases/download.html#3.5.0

I just need to clarify again. The testing that I did was just the normal make check. I did not use valgrind to test. I suspect that using valgrind will increase the sbu somewhat.

I also did not download the test-suite data as we do not have it mentioned in the book. The other thing is that with building all the documentation the build size is 2.9 gig.

I also compiled it as a Release build in cmake so that may well be the equivalent of --enable-optimized.

Should I also do the testing with valgrind to get totally accurate sbu value?

Regards,

Christopher.

Last edited 10 years ago by christopher (previous) (diff)

comment:9 by Fernando de Oliveira, 10 years ago

Owner: changed from blfs-book@… to Fernando de Oliveira
Status: newassigned
Summary: LLVM-3.5LLVM-3.5.0

Hi, Christopher,

I will keep autotools for BLFS.

I am accepting for myself, but if I finish before you, will give back to the book and leave for you to close.

in reply to:  9 comment:10 by christopher, 10 years ago

Replying to fo:

Hi, Christopher,

I will keep autotools for BLFS.

I am accepting for myself, but if I finish before you, will give back to the book and leave for you to close.

Hello Fernando,

Absolutely no problem with you accepting it. It is after all in the main book area. I just wanted to save you a bit of time by checking it.

With regards to autotools, as this is going to go into this release, I really do not like the thought of having to go through and convert the build instructions to using cmake. It really is not just a case of copying and pasting from the CMakeCache.txt file as there is a better way to post it than with boole=YES/NO.

Also we know what we get with the current instructions with regards to the optimization. At this point I really have no clue as to how to use either sed or awk to add that line to the two mentioned files. I will hunt google, but if you already know it would be great to have it.

Please do add that patch before you start building as it really will save you a few hours.

Do you know off hand how many packages throughout the book actually use llvm and clang?

I want to test that they actually work with this version. We really do not want any surprises down the track.

Of course I know about Mesa. It is entirely possible that the poster of this ticket has not actually tested building either this application or Mesa itself against it. Nor do we know if they are using 32 or 64bit. It may be that the patch for mesa only applies to a 64bit system, as the patch I found only applies to a 32bit.

Regards,

Christopher.

comment:11 by Fernando de Oliveira, 10 years ago

I've built already snd installed, but no sphinx (won't do it). It was easier, after comments in this ticket, (from you and ojab), thanks.

From the patch:

sed -i '/# Support plugins./ iLLVMLibsOptions := ../../lib/IR/Release*/Pass.o' \
       tools/bugpoint/Makefile tools/opt/Makefile 

The patch in ArchLinux is from Armin, probably.

It is listed for i686 and x86_64.

Tested mesa, valgrind, webkitgtk-2 and icu. I think that's all.

Now, rebuilding llvm plain (no clang), to confirm first obtained SBU, which I found too large.

comment:12 by Fernando de Oliveira, 10 years ago

SBU the same as before

in reply to:  11 ; comment:13 by christopher, 10 years ago

Replying to fo:

I've built already snd installed, but no sphinx (won't do it). It was easier, after comments in this ticket, (from you and ojab), thanks.

From the patch:

sed -i '/# Support plugins./ iLLVMLibsOptions := ../../lib/IR/Release*/Pass.o' \
       tools/bugpoint/Makefile tools/opt/Makefile 

The patch in ArchLinux is from Armin, probably.

It is listed for i686 and x86_64.

Tested mesa, valgrind, webkitgtk-2 and icu. I think that's all.

Now, rebuilding llvm plain (no clang), to confirm first obtained SBU, which I found too large.

Ack, I really really really do not want to build webkit again so soon. I will leave that for another build. It takes way too long on this computer. At least 4 hours if not more depending on the mood of the compiler/cpu etc. That would be an over night job as I hate watching it.

I now see that I would need to do just the sbu value without clang and then with clang, as clang is listed as an optional extra. My way would have been technically incorrect for the book as I would have just included a single combined total.

It needs to be built the way you have described.

I will do that for my own experience.

I am picking also that It would be multiple builds of llvm anyway.

1) To calculate SBU of llvm without clang and without documentation and using valgrind testing. 2) Calculate SBU of llvm with clang and without documentation. Using valgrind testing. 3) Calculate SBU of llvm with clang and with documentation. Using valgrind testing.

Regards,

Christopher.

in reply to:  13 ; comment:14 by christopher, 10 years ago

Replying to cjg:

Replying to fo:

I've built already snd installed, but no sphinx (won't do it). It was easier, after comments in this ticket, (from you and ojab), thanks.

From the patch:

sed -i '/# Support plugins./ iLLVMLibsOptions := ../../lib/IR/Release*/Pass.o' \
       tools/bugpoint/Makefile tools/opt/Makefile 

The patch in ArchLinux is from Armin, probably.

It is listed for i686 and x86_64.

Tested mesa, valgrind, webkitgtk-2 and icu. I think that's all.

Now, rebuilding llvm plain (no clang), to confirm first obtained SBU, which I found too large.

Ack, I really really really do not want to build webkit again so soon. I will leave that for another build. It takes way too long on this computer. At least 4 hours if not more depending on the mood of the compiler/cpu etc. That would be an over night job as I hate watching it.

I now see that I would need to do just the sbu value without clang and then with clang, as clang is listed as an optional extra. My way would have been technically incorrect for the book as I would have just included a single combined total.

It needs to be built the way you have described.

I will do that for my own experience.

I am picking also that It would be multiple builds of llvm anyway.

1) To calculate SBU of llvm without clang and without documentation and using valgrind testing. 2) Calculate SBU of llvm with clang and without documentation. Using valgrind testing. 3) Calculate SBU of llvm with clang and with documentation. Using valgrind testing.

Regards,

Christopher.

With the new release of Mesa, there is listed in the bugfixes references to fixing the build for the latest LLVM. So some sort of fix must be needed, unless it does not effect the release we currently have, or is only for 64bit.

Regards,

Christopher.

in reply to:  14 comment:15 by Fernando de Oliveira, 10 years ago

Replying to cjg:

With the new release of Mesa, there is listed in the bugfixes references to fixing the build for the latest LLVM. So some sort of fix must be needed, unless it does not effect the release we currently have, or is only for 64bit.

Well, that's very good, no worries about this one. Anyway, will build it and compare with the one from yesterday, to see if I missed something.

comment:16 by Fernando de Oliveira, 10 years ago

Thanks for the discussion.

Fixed at r14205 in trunk.

Leaving open for systemd

comment:17 by Fernando de Oliveira, 10 years ago

Owner: changed from Fernando de Oliveira to blfs-book@…
Status: assignednew

comment:18 by christopher, 10 years ago

Owner: changed from blfs-book@… to christopher

in reply to:  16 comment:19 by christopher, 10 years ago

Replying to fo:

Thanks for the discussion.

Fixed at r14205 in trunk.

Leaving open for systemd

Hello Fernando,

Well I have finally finished the stats for this monster. I have huge sbu values for compiling and testing all the documentation and tests.

My base processor speed is considerably less than yours I suspect, which is why I am getting higher values for what you have posted.

I know that my calculation script is correct as it is one that Bruce sent me and I have only modified it for the package being compiled.

If you wish to add the calculation for the documentation, which does include sphinx to trunk please feel free to do so.

I will have to test new version of Messa though I do not anticipate any issues there as if there were you would have already found them.

I am now closing this ticket as:

fixed at r14209 in systemd branch.

Regards,

Christopher.

comment:20 by christopher, 10 years ago

Resolution: fixed
Status: newclosed

comment:21 by Fernando de Oliveira, 10 years ago

Resolution: fixed
Status: closedreopened

in reply to:  2 comment:22 by Fernando de Oliveira, 10 years ago

Replying to ojab:

Gallium build in Mesa-10.2 is broken, upstream fix: http://cgit.freedesktop.org/mesa/mesa/commit/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp?id=564821c917f4a9d5a0de2ee77b90b0cd85e3d3a6

After discussion in dev, started by Pierre, today I decided to investigate a little more.

First, apologies to ojab. I can confirm the problem and solution, thank you, ojab, for both.

Fix from the patch at the address given by ojab:

      sed -e '/0x0303/ a#define OwningPtr std::unique_ptr\n#elif HAVE_LLVM >= 0x0303' \
          -e 's/^#if HAVE_LLVM >= 0x0303/#if HAVE_LLVM >= 0x0305/' \
          -i src/gallium/auxiliary/gallivm/lp_bld_debug.cpp

Igor, I am going to fix the book, because satrted to think that it is my responsibility, and it wouldn't be fair to push it to you. Hope you don't consider I'm intruding in your update of Mesa.

comment:23 by Fernando de Oliveira, 10 years ago

This problem, fixed at r14230.

I've become aware of some other possible problems in this version of LLVM, and am investigating, so, not closing now.

comment:24 by Fernando de Oliveira, 10 years ago

Problem remaining that I am suspecting is that multiple jobs are being used even when -j1 is passed to make. This would explain the differences between the statistics from what Christopher obtained.

I see llvm[0], llvm[1], ... in all builds.

comment:25 by Fernando de Oliveira, 10 years ago

Resolution: fixed
Status: reopenedclosed

OK, closing, but still...

Note: See TracTickets for help on using tickets.