[vim/vim] configure fails on gcc 6.0 (#800)

138 views
Skip to first unread message

Daniel Hodges

unread,
May 12, 2016, 5:47:26 PM5/12/16
to vim/vim

I've been trying to compile on fedora 24 and I'm running into this bug issue:

src/auto/config.log

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was
generated by GNU Autoconf 2.69.  Invocation command line was

  $ auto/configure --enable-multibyte --enable-python --enable-rubyinterp --enable-luainterp --with-tlib --srcdir=. --cache-file=auto/config.cache

## --------- ##
## Platform. ##
## --------- ##

hostname = fedora24.local
uname -m = x86_64
uname -r = 4.5.3-300.fc24.x86_64
uname -s = Linux
uname -v = #1 SMP Thu May 5 01:56:27 UTC 2016
....
## ----------- ##
## Core tests. ##
## ----------- ##

configure:2531: loading cache auto/config.cache
configure:2617: checking whether make sets $(MAKE)
configure:2639: result: yes
configure:2697: checking for gcc
configure:2713: found /usr/bin/gcc
configure:2724: result: gcc
configure:2953: checking for C compiler version
configure:2962: gcc --version >&5
gcc (GCC) 6.0.0 20160406 (Red Hat 6.0.0-0.20)
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:2973: $? = 0
configure:2962: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/6.0.0/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,objc,obj-c++,fortran,ada,go,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --disable-libgcj --with-isl --enable-libmpx --enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 6.0.0 20160406 (Red Hat 6.0.0-0.20) (GCC) 
configure:2973: $? = 0
configure:2962: gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:2973: $? = 1
configure:2962: gcc -qversion >&5
gcc: error: unrecognized command line option '-qversion'; did you mean '--version'?
gcc: fatal error: no input files
compilation terminated.

It seems the error is in src/auto/configure


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub

Daniel Hodges

unread,
May 12, 2016, 6:04:23 PM5/12/16
to vim/vim

Closed #800.

Tony Mechelynck

unread,
May 12, 2016, 8:07:10 PM5/12/16
to vim/vim

What happened to make you close this issue? Did it disappear on "make reconfig" or similar? Or was it something else?

Daniel Hodges

unread,
May 12, 2016, 11:52:26 PM5/12/16
to vim/vim

For some reason doing configure with --enable-rubyinterp was causing the issue, as soon as I dropped that flag I was able to configure and install correctly. I tried doing configure using --with-tlib as well and that did not help.

./configure --enable-fail-if-missing     --enable-luainterp --with-luajit     --enable-perlinterp     --enable-pythoninterp     --enable-python3interp     --enable-rubyinterp     --enable-tclinterp     --enable-multibyte     --enable-fontset
....
checking for tgetent in -lcurses... no
no terminal library found
checking for tgetent()... configure: error: NOT FOUND!
      You need to install a terminal library; for example ncurses.
      Or specify the name of the library with --with-tlib.

I do indeed have ncurses installed:

~/git/vim [master] $ sudo dnf search ncurses*
Last metadata expiration check: 0:14:19 ago on Thu May 12 23:26:38 2016.
============================================================================== N/S Matched: ncurses* ==============================================================================
ncurses-libs.x86_64 : Ncurses libraries
ncurses-libs.i686 : Ncurses libraries
ncurses.x86_64 : Ncurses support utilities
ncurses-c++-libs.x86_64 : Ncurses C++ bindings
ncurses-c++-libs.i686 : Ncurses C++ bindings
ncurses-compat-libs.x86_64 : Ncurses compatibility libraries
ncurses-compat-libs.i686 : Ncurses compatibility libraries
ncurses-base.noarch : Descriptions of common terminals
ncurses-term.noarch : Terminal descriptions
ncurses-devel.x86_64 : Development files for the ncurses library
ncurses-devel.i686 : Development files for the ncurses library
ncurses-static.x86_64 : Static libraries for the ncurses library
ncurses-static.i686 : Static libraries for the ncurses library
nudoku.x86_64 : Ncurses based Sudoku game
dhex.x86_64 : Ncurses based hexadecimal editor with a diff mode
Vuurmuur-tui.x86_64 : Ncurses based interface for modifying Vuurmuur configuration
wavemon.x86_64 : Ncurses-based monitoring application for wireless network devices

Here's the full log.

The only things which stood out where errors similar to this:

configure:11256: result: no
configure:11262: checking --with-tlib argument
configure:11297: result: empty: automatic terminal library selection
configure:11305: checking for tgetent in -ltinfo
configure:11330: gcc -o conftest -g -O2  -L. -Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,--enable-new-dtags -Wl,-z,relro    -L/usr/local/lib conftest.c -ltinfo     >&5
/usr/bin/ld: /tmp/cceImN4i.o: relocation R_X86_64_PC32 against undefined symbol `tgetent' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
configure:11330: $? = 1

h_east

unread,
May 13, 2016, 12:10:50 AM5/13/16
to vim/vim

Are you install ncurses-devel?

$ sudo dnf install ncurses-devel

Daniel Hodges

unread,
May 13, 2016, 12:15:27 AM5/13/16
to vim/vim

Yeah, it's installed....

~ $ sudo dnf install ncurses-devel-6.0-5.20160116.fc24.x86_64 
Last metadata expiration check: 0:47:36 ago on Thu May 12 23:26:38 2016.
Package ncurses-devel-6.0-5.20160116.fc24.x86_64 is already installed, skipping.
Dependencies resolved.
Nothing to do.
Complete!

John Little

unread,
May 15, 2016, 1:52:09 AM5/15/16
to vim_dev, v...@noreply.github.com, reply+00b1d1985052248a65e742fd7015fc435267343...@reply.github.com, vim-dev...@256bit.org
On Friday, May 13, 2016 at 9:47:26 AM UTC+12, Daniel Hodges wrote:
> I've been trying to compile on fedora 24 and I'm running into this bug issue:
>
> src/auto/config.log
...
> gcc: error: unrecognized command line option '-qversion'; did you mean '--version'?
> gcc: fatal error: no input files
> compilation terminated.
>
> It seems the error is in src/auto/configure

I've just installed gcc 6 on Ubuntu 16.04, and built vim using --enable-rubyinterp with no trouble. My config.log contains the errors you report; it continues:

configure:2993: checking whether the C compiler works

I conclude that those errors are not your problem. You may have concluded the same, since --enable-rubyinterp has nothing to do with that part of configure's processing.

Regards, John Little

zdohnal

unread,
Feb 27, 2019, 4:42:04 AM2/27/19
to vim/vim, vim-dev ML, Comment

Hi everyone!
If someone hits the same problem, the solution is to add:

LDFLAGS="$LDFLAGS -fPIC"

to 'configure' command line invocation. It seems something (probably a tool from autotools - autoconf) does not provide -fPIC into LDFLAGS in Fedora. Because when I manually compile the code (although I need to add <term.h> as include) with -lncurses, it compiles correctly. So either gcc/ld uses -fPIC without my notice, when I use gcc manually, or autoconf does not set it....


You are receiving this because you commented.
Reply to this email directly, view it on GitHub

Reply all
Reply to author
Forward
0 new messages