[LLVMdev] LLVM Testing Experience

Mehmet Erol Sanliturk m.e.sanliturk at gmail.com
Wed Nov 26 12:08:18 PST 2014


Dears All ,


I am not a C/C++ programmer and my knowledge about them is very weak .
In my life I did never write a "Makefile" and my knowledge about it is
completely zero.

I want to learn Clang and LLVM as much as possible , mostly because I want
to write a Pascal front end for LLVM by using Clang compiler parts as much
as possible .

For this reason and on message by Tom Stellard

http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-November/078682.html
[LLVMdev] 3.5.1 Release Schedule

"Below is the proposed release schedule for LLVM 3.5.1.  As always,
we need testers, so if you are interested in helping with that, let
me know."

I wanted to download Release 3.5.0 and apply tests on it .

If I can do this I could also apply my experience to release candidates .
With respect to my experiences , a
developer uses an accustomed line of testing and may not cover all of the
possibilities
which doing such a coverage is an impossible task . Another person not
knowing the system very well may follow a different line and may discover
some problems on this different line .
Therefore being ignorant about LLVM system is not so much detrimental for
testing .


I had installed in Linux ( Fedora 20 x86_64 ) OS supplied Clang 3.4.10 and
LLVM 3.4.10 .
Sometimes I am using Clang to compile small programs alongside with GCC
4.8.3 .
This is especially useful because sometimes one is detecting an error but
another one is not .
Therefore during program development , using different compilers on the
same program
is an excellent "code review" by a compiler as a "very high quality expert"
.


I am sorry about being verbose but I wanted to be explicit as much as
possible .


I have downloaded

http://llvm.org/releases/3.5.0/cfe-3.5.0.src.tar.xz
http://llvm.org/releases/3.5.0/llvm-3.5.0.src.tar.xz
http://llvm.org/releases/3.5.0/compiler-rt-3.5.0.src.tar.xz
http://llvm.org/releases/3.5.0/dragonegg-3.5.0.src.tar.xz
http://llvm.org/releases/3.5.0/libcxx-3.5.0.src.tar.xz
http://llvm.org/releases/3.5.0/libcxxabi-3.5.0.src.tar.xz
http://llvm.org/releases/3.5.0/lldb-3.5.0.src.tar.xz
http://llvm.org/releases/3.5.0/lld-3.5.0.src.tar.xz
http://llvm.org/releases/3.5.0/polly-3.5.0.src.tar.xz
http://llvm.org/releases/3.5.0/openmp-3.5.0.src.tar.xz
http://llvm.org/releases/3.5.0/clang-tools-extra-3.5.0.src.tar.xz
http://llvm.org/releases/3.5.0/test-suite-3.5.0.src.tar.xz


into a directory ...../www.llvm.org/3.5.0/ ( where ..... is the upper
directories list ) .


I have decompressed them by using the Ark of KDE into the above directory .


The created directories are as follows  :

 ...../www.llvm.org/3.5.0/cfe-3.5.0-src/
 ...../www.llvm.org/3.5.0/clang-tools-extra-3.5.0.src/
 ...../www.llvm.org/3.5.0/compiler-rt-3.5.0.src/
 ...../www.llvm.org/3.5.0/dragonegg-3.5.0.src/
 ...../www.llvm.org/3.5.0/libcxx-3.5.0.src/
 ...../www.llvm.org/3.5.0/libcxxabi-3.5.0.src/
 ...../www.llvm.org/3.5.0/lld-3.5.0.src/
 ...../www.llvm.org/3.5.0/lldb-3.5.0.src/
 ...../www.llvm.org/3.5.0/llvm-3.5.0.src/
 ...../www.llvm.org/3.5.0/openmp-3.5.0.src/
 ...../www.llvm.org/3.5.0/polly-3.5.0.src/
 ...../www.llvm.org/3.5.0/test-suite-3.5.0.src/


--------------------------------------------------------------------------------

By thinking the root of the above components would be LLVM ,
I have opened a Console terminal into

 ...../www.llvm.org/3.5.0/llvm-3.5.0.src/


Since there were existing

   "configure"

script and a "Makefile" , I have applied it with following make execution .

The make completed without an error .
The make only processed the ...../www.llvm.org/3.5.0/llvm-3.5.0.src
directories .


--------------------------------------------------------------------------------

I have opened a Console terminal into

 ...../www.llvm.org/3.5.0/cfe-3.5.0.src/

There was not a

   "configure"

script but a "Makefile" , I have applied make .


[s at localhost cfe-3.5.0.src]$ make
Makefile:48: ../../Makefile.common: No such file or directory
make: *** No rule to make target `../../Makefile.common'.  Stop.


--------------------------------------------------------------------------------


I have opened a Console terminal into

 ...../www.llvm.org/3.5.0/cfe-tools-extra-3.5.0.src/


There was not a

   "configure"

script but a "Makefile" , I have applied make .


[s at localhost clang-tools-extra-3.5.0.src]$ make
Makefile:12: ../../../../Makefile.config: No such file or directory
Makefile:19: ../../Makefile: No such file or directory
make: *** No rule to make target `../../Makefile'.  Stop.


--------------------------------------------------------------------------------


I have opened a Console terminal into

 ...../www.llvm.org/3.5.0/compiler-rt-3.5.0.src/


There was not a

   "configure"

script but a "Makefile" , I have applied make .


[s at localhost compiler-rt-3.5.0.src]$ make
warning: clang_darwin.mk: dropping arch 'i386' from lib 'eprintf' (ld does
not support it)
warning: clang_darwin.mk: dropping arch 'i386' from lib '10.4' (ld does not
support it)
warning: clang_darwin.mk: dropping arch 'x86_64' from lib '10.4' (ld does
not support it)
warning: clang_darwin.mk: dropping arch 'i386' from lib 'ios' (ld does not
support it)
warning: clang_darwin.mk: dropping arch 'x86_64' from lib 'ios' (ld does
not support it)
warning: clang_darwin.mk: dropping arch 'x86_64h' from lib 'ios' (ld does
not support it)
warning: clang_darwin.mk: dropping arch 'armv7' from lib 'ios' (ld does not
support it)
warning: clang_darwin.mk: dropping arch 'i386' from lib 'osx' (ld does not
support it)
warning: clang_darwin.mk: dropping arch 'x86_64' from lib 'osx' (ld does
not support it)
warning: clang_darwin.mk: dropping arch 'x86_64h' from lib 'osx' (ld does
not support it)
warning: clang_darwin.mk: dropping arch 'armv7' from lib 'cc_kext' (ld does
not support it)
warning: clang_darwin.mk: dropping arch 'i386' from lib 'cc_kext' (ld does
not support it)
warning: clang_darwin.mk: dropping arch 'x86_64' from lib 'cc_kext' (ld
does not support it)
warning: clang_darwin.mk: dropping arch 'x86_64h' from lib 'cc_kext' (ld
does not support it)
warning: clang_darwin.mk: dropping arch 'x86_64' from lib 'cc_kext_ios5'
(ld does not support it)
warning: clang_darwin.mk: dropping arch 'x86_64h' from lib 'cc_kext_ios5'
(ld does not support it)
warning: clang_darwin.mk: dropping arch 'armv7' from lib 'cc_kext_ios5' (ld
does not support it)
warning: clang_darwin.mk: dropping arch 'i386' from lib 'profile_osx' (ld
does not support it)
warning: clang_darwin.mk: dropping arch 'x86_64' from lib 'profile_osx' (ld
does not support it)
warning: clang_darwin.mk: dropping arch 'x86_64h' from lib 'profile_osx'
(ld does not support it)
warning: clang_darwin.mk: dropping arch 'i386' from lib 'profile_ios' (ld
does not support it)
warning: clang_darwin.mk: dropping arch 'x86_64' from lib 'profile_ios' (ld
does not support it)
warning: clang_darwin.mk: dropping arch 'x86_64h' from lib 'profile_ios'
(ld does not support it)
warning: clang_darwin.mk: dropping arch 'armv7' from lib 'profile_ios' (ld
does not support it)
warning: clang_darwin.mk: dropping arch 'i386' from lib 'asan_osx_dynamic'
(ld does not support it)
warning: clang_darwin.mk: dropping arch 'x86_64' from lib
'asan_osx_dynamic' (ld does not support
it)

warning: clang_darwin.mk: dropping arch 'x86_64h' from lib
'asan_osx_dynamic' (ld does not support
it)

warning: clang_darwin.mk: dropping arch 'i386' from lib 'ubsan_osx' (ld
does not support
it)

warning: clang_darwin.mk: dropping arch 'x86_64' from lib 'ubsan_osx' (ld
does not support
it)

warning: clang_darwin.mk: dropping arch 'x86_64h' from lib 'ubsan_osx' (ld
does not support
it)

usage: make [{VARIABLE=VALUE}*]
target


User variables:
  VERBOSE=1: Use to show all commands [default=0]

Available targets:
  <platform name>: build the libraries for 'platform'
  clean:           clean all configurations
  test:            run unit tests

  info-platforms:  list available platforms
  help-devel:      print additional help for developers


--------------------------------------------------------------------------------


I have opened a Console terminal into

 ...../www.llvm.org/3.5.0/dragonegg-3.5.0.src/


There was not a

   "configure"

script but a "Makefile" , I have applied make .


[s at localhost dragonegg-3.5.0.src]$ make
Compiling utils/TargetInfo.cpp
usage: llvm-config <OPTION>... [<COMPONENT>...]

Get various configuration information needed to compile programs which use
LLVM.  Typically called from 'configure' scripts.  Examples:
  llvm-config --cxxflags
  llvm-config --ldflags
  llvm-config --libs engine bcreader scalaropts

Options:
  --version         Print LLVM version.
  --prefix          Print the installation prefix.
  --src-root        Print the source root LLVM was built from.
  --obj-root        Print the object root used to build LLVM.
  --bindir          Directory containing LLVM executables.
  --includedir      Directory containing LLVM headers.
  --libdir          Directory containing LLVM libraries.
  --cppflags        C preprocessor flags for files that include LLVM
headers.
  --cflags          C compiler flags for files that include LLVM headers.
  --cxxflags        C++ compiler flags for files that include LLVM headers.
  --ldflags         Print Linker flags.
  --libs            Libraries needed to link against LLVM components.
  --libnames        Bare library names for in-tree builds.
  --libfiles        Fully qualified library filenames for makefile depends.
  --components      List of all possible components.
  --targets-built   List of all targets currently built.
  --host-target     Target triple used to configure LLVM.
  --build-mode      Print build mode of LLVM tree (e.g. Debug or Release).
Typical components:
  all               All LLVM libraries (default).
  engine            Either a native JIT or a bitcode interpreter.
Linking TargetInfo
TargetInfo.o: In function `PrintVendorName':
...../clang.llvm.org/3.5.0/dragonegg-3.5.0.src/utils/TargetInfo.cpp:35:
undefined reference to
`llvm::Triple::getVendorTypeName(llvm::Triple::VendorType)'
TargetInfo.o: In function `PrintArchTypePrefix':
...../clang.llvm.org/3.5.0/dragonegg-3.5.0.src/utils/TargetInfo.cpp:41:
undefined reference to
`llvm::Triple::getArchTypePrefix(llvm::Triple::ArchType)'
TargetInfo.o: In function `PrintArchName':
...../clang.llvm.org/3.5.0/dragonegg-3.5.0.src/utils/TargetInfo.cpp:32:
undefined reference to
`llvm::Triple::getArchTypeName(llvm::Triple::ArchType)'
TargetInfo.o: In function
`PrintOSName':
...../clang.llvm.org/3.5.0/dragonegg-3.5.0.src/utils/TargetInfo.cpp:38:
undefined reference to
`llvm::Triple::getOSTypeName(llvm::Triple::OSType)'
TargetInfo.o: In function
`main':
...../clang.llvm.org/3.5.0/dragonegg-3.5.0.src/utils/TargetInfo.cpp:59:
undefined reference to
`llvm::Triple::normalize(llvm::StringRef)'
...../clang.llvm.org/3.5.0/dragonegg-3.5.0.src/utils/TargetInfo.cpp:59:
undefined reference to `llvm::Triple::Triple(llvm::Twine
const&)'
collect2: error: ld returned 1 exit
status
make: *** [TargetInfo] Error 1


--------------------------------------------------------------------------------


I have opened a Console terminal into

 ...../www.llvm.org/3.5.0/libcxx-3.5.0.src/


There was not a

   "configure"

script but a "Makefile" , I have applied make .


[s at localhost libcxx-3.5.0.src]$ make
Use make install DSTROOT=<destination>


--------------------------------------------------------------------------------


I have opened a Console terminal into

 ...../www.llvm.org/3.5.0/libcxxabi-3.5.0.src/


There was not a

   "configure"

script and not a "Makefile" .

There was not anything to do .


--------------------------------------------------------------------------------


I have opened a Console terminal into

 ...../www.llvm.org/3.5.0/lld-3.5.0.src/


There was not a

   "configure"

script but a "Makefile" , I have applied make .


[s at localhost lld-3.5.0.src]$ make
Makefile:39: ../../Makefile.common: No such file or directory
make: *** No rule to make target `../../Makefile.common'.  Stop.


--------------------------------------------------------------------------------


I have opened a Console terminal into

 ...../www.llvm.org/3.5.0/lldb-3.5.0.src/


There was not a

   "configure"

script but a "Makefile" , I have applied make .


[s at localhost lldb-3.5.0.src]$ make
Makefile:29: ../../Makefile.common: No such file or directory
make: *** No rule to make target `../../Makefile.common'.  Stop.

--------------------------------------------------------------------------------


I have opened a Console terminal into

 ...../www.llvm.org/3.5.0/openmp-3.5.0.src/


There was not a

   "configure"

script and not a "Makefile" .


There was not anything to do .


--------------------------------------------------------------------------------

I have opened a Console terminal into

 ...../www.llvm.org/3.5.0/polly-3.5.0.src/


Since there were existing

   "configure"

script and a "Makefile" , I have applied it with following make execution .


[s at localhost polly-3.5.0.src]$ ./configure
configure: error: cannot find install-sh, install.sh, or shtool in ...../
clang.llvm.org/autoconf "."/...../clang.llvm.org/autoconf
[s at localhost polly-3.5.0.src]$ make
Makefile:17: Makefile.common: No such file or directory
make: *** No rule to make target `Makefile.common'.  Stop.

--------------------------------------------------------------------------------


I have opened a Console terminal into

 ...../www.llvm.org/3.5.0/test-suite-3.5.0.src/

Since there were existing

   "configure"

script and a "Makefile" .


./configure

has been applied , and it has been completed .


[s at localhost test-suite-3.5.0.src]$ make
Makefile.config:38: ...../clang.llvm.org/Makefile.config: No such file or
directory
make: *** No rule to make target `...../clang.llvm.org/Makefile.config'.
Stop.

--------------------------------------------------------------------------------

After the above one success and other all failures , I have started to
review
the directories once more .


 ...../www.llvm.org/3.5.0/llvm-3.5.0.src/

There is a "LLVMBuild.txt" file referring to

http://llvm.org/docs/LLVMBuild.html

In that page , there is no any information about building LLVM from a
downloaded release candidate or release source files .


 ...../www.llvm.org/3.5.0/cfe-3.5.0.src/


There is no a "ClangBuild.txt" file .
There is a "README.txt" file referring to

http://clang.llvm.org/get_started.html

In that page , there is no any information about building CLang from a
downloaded release candidate or release source files , but from SVN .


 ...../www.llvm.org/3.5.0/cfe-tools-extra-3.5.0.src/


There is no a "ClangToolsExtraBuild.txt" file .
There is a "README.txt" file without any information about
how to build from downloaded source files other than
mentioning a check out into Clang + LLVM tree .


 ...../www.llvm.org/3.5.0/compiler-rt-3.5.0.src/


There is no a "CompilerRTBuild.txt" file .
There is a "README.txt" file without any information about
how to build from downloaded source files .


 ...../www.llvm.org/3.5.0/dragonegg-3.5.0.src/


There is no a "DragonEggBuild.txt" file .
There is a "README" file with information about build of DragonEgg
without any relation to how to build from downloaded source files .


 ...../www.llvm.org/3.5.0/libcxx-3.5.0.src/


There is no a "LibCXXBuild.txt" file .
There is no "README.txt" file .


 ...../www.llvm.org/3.5.0/libcxxabi-3.5.0.src/


There is no a "LibCXXABIBuild.txt" file .
There is no a "README.txt" file .


 ...../www.llvm.org/3.5.0/lld-3.5.0.src/


There is no a "LLDBuild.txt" file .
There is a "README.md" file without any information about build .


 ...../www.llvm.org/3.5.0/lldb-3.5.0.src/


There is no a "LLDBBuild.txt" file .
There is no a "README.txt" file .
There is an "INSTALL.txt" containing information about LLVM build dependency
without information about downloaded source files .


 ...../www.llvm.org/3.5.0/openmp-3.5.0.src/


There is no a "OpenMPBuild.txt" file .
There is no a "README.txt" file .


 ...../www.llvm.org/3.5.0/polly-3.5.0.src/


There is no a "PollyBuild.txt" file .
There is a "README" file without any information about build .


 ...../www.llvm.org/3.5.0/test-suite-3.5.0.src/


There is no a "LLVMTestSuiteBuild.txt" file .
There is a "README.txt" file with reference to page

http://llvm.org/docs/TestingGuide.html


without any information about building from downloaded source files .

--------------------------------------------------------------------------------



Opinions :


Within page

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


inclusion of a file with a name such as
"LLVM_and_Clang_Building_from_Sources_of_3_.5.0.txt"
containing information about building the components from downloaded source
files would be very useful where "3.5.0" part will always be related to
supplied version .


Inclusion of two parts may be useful :

Building with an existing installed CLang / LLVM system
Building with generated CLang / LLVM system from downloaded source files

If it is may be useful , a part for

Building with an existing installed GCC system

may be included .


If such a file is supplied , I can apply and report my experiences with the
expectation that my opinions will not be ragarded as critisms but only
telling the difficulty points where "Thank you" part perhaps may be
forgotten .

I will use Linux x86_64 .

If you need another free x86_64 class OS , I may try or inform you about my
difficulty about it .

-----------


Build related and ReadMe.txt files are not consistently designed and
included .


-----------


Inclusion of a Documentation related file containing all of the
documentation related files
in the following list would be very helpful :


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


The current state is the following :


In page
http://llvm.org/docs/


there is the following sentence :

If you are using a released version of LLVM, see the download page to find
your documentation.


Clicking on the "the download page" is leading the page


http://llvm.org/releases/

On this page , clicking "docs" is leading to the page :

http://llvm.org/releases/3.5.0/docs/index.html


In that page , there is the following sentence :

If you are using a released version of LLVM, see the download page to find
your documentation.

Clicking on the "the download page" is leading the page


http://llvm.org/releases/


i.e. , there is a circular referencing between links .


The expectation is a complete tarball to download .


-----------


There is no any consistent system of

configure
make

structure within downladed source files .


I am working on many other sources which almost all of them are
working either with this pair or with make .
Even if CMake is used , the make is using that system .



-----------


Thank you very much .


Mehmet Erol Sanliturk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141126/7884fc13/attachment.html>


More information about the llvm-dev mailing list