Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

llvm-config: error: components given, but unused #13486

Open Quuxplusone opened 12 years ago

Quuxplusone commented 12 years ago
Bugzilla Link PR13430
Status NEW
Importance P normal
Reported by Vinson Lee (vlee@freedesktop.org)
Reported on 2012-07-21 15:42:29 -0700
Last modified on 2013-12-05 02:13:29 -0800
Version 3.1
Hardware PC other
CC geek4civic@gmail.com, hiyuh.root@gmail.com, llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
$ uname
CYGWIN_NT-6.1-WOW64

$ llvm-config.exe --version
3.1

$ llvm-config.exe --libs
-lLLVM-3.1

$ llvm-config.exe --libs all
-lLLVM-3.1
llvm-config: error: components given, but unused

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.
Quuxplusone commented 12 years ago
What is your configuration?

./config.status --version

I guess you are configured with --enable-shared.

It seems llvm-config is still incompatible to shared libs...
See also bug 6823. Note that llvm-config has been rewritten since then.
(For now, I will not mark this as DUPLLICATED)
Quuxplusone commented 12 years ago
I am using llvm supplied from Cygwin.

llvm-3.1-1.cygport
    47  src_compile() {
    48          # leave optimization to build system, fails to dlopen with -O2
    49          CFLAGS=${CFLAGS/-O[0-9]/}
    50          CXXFLAGS=${CXXFLAGS/-O[0-9]/}
    51
    52  #       local gccdir=/usr/lib/gcc/i686-pc-cygwin/$(${CC} -dumpversion)
    53
    54          cd ${B}
    55          cygconf --disable-assertions --enable-optimized --enable-debug-runtime \
    56                  --enable-debug-symbols --enable-targets=all \
    57                  --enable-libffi --enable-shared --disable-embed-stdcxx \
    58                  --with-gcc-toolchain=/usr
    59  #               --with-clang-resource-dir=../lib/clang/i686-pc-cygwin/${PV} \
    60  #               --with-c-include-dirs=${gccdir}/include:/usr/include:/usr/include/w32api
    61
    62          cygmake REQUIRES_RTTI=1
    63  }
Quuxplusone commented 10 years ago
same here.
making llvm-3.1-4.cygport w/o --enable-shared is the answer?

$ uname -a
CYGWIN_NT-5.1 jabberwocky 1.7.26(0.271/5/3) 2013-11-29 11:25 i686 Cygwin

$ llvm-config.exe --version
3.1

$ cygcheck  -c llvm
Cygwin Package Information
Package              Version        Status
llvm                 3.1-3          OK

$ llvm-config.exe --libs all
-lLLVM-3.1
llvm-config: error: components given, but unused

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.
Quuxplusone commented 10 years ago
(In reply to comment #3)
> same here.
> making llvm-3.1-4.cygport w/o --enable-shared is the answer?

i tried cygwin-ports llvm git[1] w/o --enable-shared, but it fails.

llvm[2]: Linking Release+Debug executable llvm-as
g++: error: Error: No such file or directory
/home/hiyuh/git-repos/cygwin-ports-llvm/llvm-3.1-4/src/llvm-
3.1.src/Makefile.rules:1515: recipe for target '/home/hiyuh/git-repos/cygwin-
ports-llvm/llvm-3.1-4/build/Release+Debug/bin/llvm-as.exe' failed
make[2]: *** [/home/hiyuh/git-repos/cygwin-ports-llvm/llvm-3.1-
4/build/Release+Debug/bin/llvm-as.exe] Error 1
make[2]: Leaving directory '/home/hiyuh/git-repos/cygwin-ports-llvm/llvm-3.1-
4/build/tools/llvm-as'
/home/hiyuh/git-repos/cygwin-ports-llvm/llvm-3.1-4/src/llvm-
3.1.src/Makefile.rules:904: recipe for target 'llvm-as/.makeall' failed
make[1]: *** [llvm-as/.makeall] Error 2
make[1]: *** Waiting for unfinished jobs....

--
[1] http://cygwin-ports.git.sourceforge.net/git/gitweb.cgi?p=cygwin-
ports/llvm;a=summary
Quuxplusone commented 10 years ago
(In reply to comment #4)
> (In reply to comment #3)
> > same here.
> > making llvm-3.1-4.cygport w/o --enable-shared is the answer?
>
> i tried cygwin-ports llvm git[1] w/o --enable-shared, but it fails.

after poking llvm.cygport, i realized this 'cause a broken patch from cygwin
ports. maybe, llvm-3.1 itself has no task for this bug.

http://sourceforge.net/mailarchive/message.php?msg_id=31712339
Quuxplusone commented 10 years ago
(In reply to comment #5)
> after poking llvm.cygport, i realized this 'cause a broken patch from cygwin
> ports. maybe, llvm-3.1 itself has no task for this bug.
>
> http://sourceforge.net/mailarchive/message.php?msg_id=31712339

umm, this patch fix build, but it does not work after installing b/c llvm-
config's library handling is totally broken. real fix for 3.1 seems overwork so
ill try cygwin specific workaround later.
Quuxplusone commented 10 years ago
(In reply to comment #6)
> (In reply to comment #5)
> > after poking llvm.cygport, i realized this 'cause a broken patch from cygwin
> > ports. maybe, llvm-3.1 itself has no task for this bug.
> >
> > http://sourceforge.net/mailarchive/message.php?msg_id=31712339
>
> umm, this patch fix build, but it does not work after installing b/c
> llvm-config's library handling is totally broken. real fix for 3.1 seems
> overwork so ill try cygwin specific workaround later.

updated, it looks ok to me even after installing.

http://sourceforge.net/mailarchive/forum.php?thread_name=1386231103-125252-2-git-send-email-hiyuh.root%40gmail.com&forum_name=cygwin-ports-general