Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 654678 - dev-libs/log4cxx - checking for APR-util... configure: error: the --with-apr-util parameter is incorrect. It must specify an install prefix, a build directory, or an apu-config file.
Summary: dev-libs/log4cxx - checking for APR-util... configure: error: the --with-apr-...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2018-05-03 01:49 UTC by Sammy Pfeiffer
Modified: 2018-05-29 09:59 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,10.05 KB, text/plain)
2018-05-03 01:49 UTC, Sammy Pfeiffer
Details
emerge --info (emergeinfo.txt,5.03 KB, text/plain)
2018-05-03 01:50 UTC, Sammy Pfeiffer
Details
emerge -pqv output (emergepqv.txt,190 bytes, text/plain)
2018-05-03 01:51 UTC, Sammy Pfeiffer
Details
environment (environment,15.00 KB, text/plain)
2018-05-03 01:51 UTC, Sammy Pfeiffer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sammy Pfeiffer 2018-05-03 01:49:48 UTC
Created attachment 529500 [details]
build.log

Hello, building on a Gentoo Prefix environment I get:


>>> Emerging (14 of 164) dev-libs/log4cxx-0.10.0-r1::gentoo
 * apache-log4cxx-0.10.0.tar.gz BLAKE2B SHA512 size ;-) ...                                                                                                                             [ ok ]
>>> Unpacking source...
>>> Unpacking apache-log4cxx-0.10.0.tar.gz to /tmp/gentoo/var/tmp/portage/dev-libs/log4cxx-0.10.0-r1/work
tar: A lone zero block at 29249
>>> Source unpacked in /tmp/gentoo/var/tmp/portage/dev-libs/log4cxx-0.10.0-r1/work
>>> Preparing source in /tmp/gentoo/var/tmp/portage/dev-libs/log4cxx-0.10.0-r1/work/apache-log4cxx-0.10.0 ...
 * Applying log4cxx-0.10.0-missing_includes.patch ...                                                                                                                                   [ ok ]
 * Applying log4cxx-0.10.0-gcc44.patch ...                                                                                                                                              [ ok ]
 * Applying log4cxx-0.10.0-unixODBC.patch ...                                                                                                                                           [ ok ]
 * Applying log4cxx-0.10.0-fix-c++14.patch ...                                                                                                                                          [ ok ]
>>> Source prepared.
>>> Configuring source in /tmp/gentoo/var/tmp/portage/dev-libs/log4cxx-0.10.0-r1/work/apache-log4cxx-0.10.0 ...
 * econf: updating apache-log4cxx-0.10.0/config.guess with /tmp/gentoo/usr/share/gnuconfig/config.guess
 * econf: updating apache-log4cxx-0.10.0/config.sub with /tmp/gentoo/usr/share/gnuconfig/config.sub
./configure --prefix=/tmp/gentoo/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/tmp/gentoo/usr/share/man --infodir=/tmp/gentoo/usr/share/info --datadir=/tmp/gentoo/usr/share --sysconfdir=/tmp/gentoo/etc --localstatedir=/tmp/gentoo/var/lib --disable-dependency-tracking --libdir=/tmp/gentoo/usr/lib64 --disable-doxygen --disable-html-docs --with-apr-util=//usr --without-SMTP --without-ODBC --with-charset=utf-8
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /tmp/gentoo/usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether x86_64-pc-linux-gnu-gcc accepts -g... yes
checking for x86_64-pc-linux-gnu-gcc option to accept ANSI C... none needed
checking dependency style of x86_64-pc-linux-gnu-gcc... none
checking for a sed that does not truncate output... /tmp/gentoo/bin/sed
checking for egrep... grep -E
checking for ld used by x86_64-pc-linux-gnu-gcc... /tmp/gentoo/usr/x86_64-pc-linux-gnu/bin/ld
checking if the linker (/tmp/gentoo/usr/x86_64-pc-linux-gnu/bin/ld) is GNU ld... yes
checking for /tmp/gentoo/usr/x86_64-pc-linux-gnu/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /tmp/gentoo/usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... x86_64-pc-linux-gnu-gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for x86_64-pc-linux-gnu-g++... x86_64-pc-linux-gnu-g++
checking whether we are using the GNU C++ compiler... yes
checking whether x86_64-pc-linux-gnu-g++ accepts -g... yes
checking dependency style of x86_64-pc-linux-gnu-g++... none
checking how to run the C++ preprocessor... x86_64-pc-linux-gnu-g++ -E
checking for x86_64-pc-linux-gnu-g77... no
checking for x86_64-pc-linux-gnu-f77... no
checking for x86_64-pc-linux-gnu-xlf... no
checking for x86_64-pc-linux-gnu-frt... no
checking for x86_64-pc-linux-gnu-pgf77... no
checking for x86_64-pc-linux-gnu-fort77... no
checking for x86_64-pc-linux-gnu-fl32... no
checking for x86_64-pc-linux-gnu-af77... no
checking for x86_64-pc-linux-gnu-f90... no
checking for x86_64-pc-linux-gnu-xlf90... no
checking for x86_64-pc-linux-gnu-pgf90... no
checking for x86_64-pc-linux-gnu-epcf90... no
checking for x86_64-pc-linux-gnu-f95... no
checking for x86_64-pc-linux-gnu-fort... no
checking for x86_64-pc-linux-gnu-xlf95... no
checking for x86_64-pc-linux-gnu-ifc... no
checking for x86_64-pc-linux-gnu-efc... no
checking for x86_64-pc-linux-gnu-pgf95... no
checking for x86_64-pc-linux-gnu-lf95... no
checking for x86_64-pc-linux-gnu-gfortran... x86_64-pc-linux-gnu-gfortran
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether x86_64-pc-linux-gnu-gfortran accepts -g... yes
checking the maximum length of command line arguments... 32768
checking command to parse /tmp/gentoo/usr/bin/nm -B output from x86_64-pc-linux-gnu-gcc object... ok
checking for objdir... .libs
checking for x86_64-pc-linux-gnu-ar... x86_64-pc-linux-gnu-ar
checking for x86_64-pc-linux-gnu-ranlib... x86_64-pc-linux-gnu-ranlib
checking for x86_64-pc-linux-gnu-strip... x86_64-pc-linux-gnu-strip
checking if x86_64-pc-linux-gnu-gcc supports -fno-rtti -fno-exceptions... no
checking for x86_64-pc-linux-gnu-gcc option to produce PIC... -fPIC
checking if x86_64-pc-linux-gnu-gcc PIC flag -fPIC works... yes
checking if x86_64-pc-linux-gnu-gcc static flag -static works... yes
checking if x86_64-pc-linux-gnu-gcc supports -c -o file.o... yes
checking whether the x86_64-pc-linux-gnu-gcc linker (/tmp/gentoo/usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by x86_64-pc-linux-gnu-g++... /tmp/gentoo/usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64
checking if the linker (/tmp/gentoo/usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the x86_64-pc-linux-gnu-g++ linker (/tmp/gentoo/usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for x86_64-pc-linux-gnu-g++ option to produce PIC... -fPIC
checking if x86_64-pc-linux-gnu-g++ PIC flag -fPIC works... yes
checking if x86_64-pc-linux-gnu-g++ static flag -static works... yes
checking if x86_64-pc-linux-gnu-g++ supports -c -o file.o... yes
checking whether the x86_64-pc-linux-gnu-g++ linker (/tmp/gentoo/usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for x86_64-pc-linux-gnu-gfortran option to produce PIC... -fPIC
checking if x86_64-pc-linux-gnu-gfortran PIC flag -fPIC works... yes
checking if x86_64-pc-linux-gnu-gfortran static flag -static works... yes
checking if x86_64-pc-linux-gnu-gfortran supports -c -o file.o... yes
checking whether the x86_64-pc-linux-gnu-gfortran linker (/tmp/gentoo/usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for a BSD-compatible install... /tmp/gentoo/usr/bin/install -c
checking whether make sets $(MAKE)... (cached) yes
checking for x86_64-pc-linux-gnu-g++... (cached) x86_64-pc-linux-gnu-g++
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether x86_64-pc-linux-gnu-g++ accepts -g... (cached) yes
checking dependency style of x86_64-pc-linux-gnu-g++... (cached) none
checking how to run the C++ preprocessor... x86_64-pc-linux-gnu-g++ -E
checking for APR... yes
checking for APR-util... configure: error: the --with-apr-util parameter is incorrect. It must specify an install prefix, a build directory, or an apu-config file.

!!! Please attach the following file when seeking support:
!!! /tmp/gentoo/var/tmp/portage/dev-libs/log4cxx-0.10.0-r1/work/apache-log4cxx-0.10.0/config.log
 * ERROR: dev-libs/log4cxx-0.10.0-r1::gentoo failed (configure phase):
 *   econf failed
 * 
 * Call stack:
 *               ebuild.sh, line 124:  Called src_configure
 *             environment, line 361:  Called econf '--disable-doxygen' '--disable-html-docs' '--with-apr-util=//usr' '--without-SMTP' '--without-ODBC' '--with-charset=utf-8'
 *        phase-helpers.sh, line 718:  Called __helpers_die 'econf failed'
 *   isolated-functions.sh, line 121:  Called die
 * The specific snippet of code:
 *   		die "$@"
 * 
 * If you need support, post the output of `emerge --info '=dev-libs/log4cxx-0.10.0-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-libs/log4cxx-0.10.0-r1::gentoo'`.
 * The complete build log is located at '/tmp/gentoo/var/tmp/portage/dev-libs/log4cxx-0.10.0-r1/temp/build.log'.
 * The ebuild environment file is located at '/tmp/gentoo/var/tmp/portage/dev-libs/log4cxx-0.10.0-r1/temp/environment'.
 * Working directory: '/tmp/gentoo/var/tmp/portage/dev-libs/log4cxx-0.10.0-r1/work/apache-log4cxx-0.10.0'
 * S: '/tmp/gentoo/var/tmp/portage/dev-libs/log4cxx-0.10.0-r1/work/apache-log4cxx-0.10.0'

>>> Failed to emerge dev-libs/log4cxx-0.10.0-r1, Log file:

>>>  '/tmp/gentoo/var/tmp/portage/dev-libs/log4cxx-0.10.0-r1/temp/build.log'
Comment 1 Sammy Pfeiffer 2018-05-03 01:50:44 UTC
Created attachment 529502 [details]
emerge --info

Add emerge --info output
Comment 2 Sammy Pfeiffer 2018-05-03 01:51:13 UTC
Created attachment 529504 [details]
emerge -pqv output

Adding emeerge -pqv output
Comment 3 Sammy Pfeiffer 2018-05-03 01:51:44 UTC
Created attachment 529506 [details]
environment

Adding environment output
Comment 4 Sammy Pfeiffer 2018-05-03 02:10:17 UTC
I could get the compilation working by changing the ebuild from:

src_configure() {
        econf \
               	--disable-doxygen \
                --disable-html-docs \
		--with-apr-util="${SYSROOT:-${EPREFIX}}/usr" \
                $(use_with smtp SMTP libesmtp) \
                $(use_with odbc ODBC $(usex iodbc iODBC unixODBC)) \
                --with-charset=$(usex unicode utf-8 auto)
}


To:

src_configure() {
        econf \
               	--disable-doxygen \
                --disable-html-docs \
                --with-apr-util="${EPREFIX:-${SYSROOT%/}}/usr" \
                $(use_with smtp SMTP libesmtp) \
                $(use_with odbc ODBC $(usex iodbc iODBC unixODBC)) \
                --with-charset=$(usex unicode utf-8 auto)
}

Which maybe is the expected logic?
If EPREFIX exists (only exists in Gentoo Prefix environment as what I understand in https://devmanual.gentoo.org/ebuild-writing/variables/index.html) we use that variable, otherwise we default to SYSROOT in case someone is crosscompiling and that variable is different from /.

I'm new to Gentoo, I hope this is helpful.
Comment 5 Sammy Pfeiffer 2018-05-03 02:15:52 UTC
In patch shape:


--- logoriginal.txt	2018-05-03 02:14:01.673506744 -0000
+++ log4cxx-0.10.0-r1.ebuild	2018-05-03 02:04:10.675223362 -0000
@@ -45,7 +45,7 @@
 	econf \
 		--disable-doxygen \
 		--disable-html-docs \
-		--with-apr-util="${SYSROOT:-${EPREFIX}}/usr" \
+		--with-apr-util="${EPREFIX:-${SYSROOT%/}}/usr" \
 		$(use_with smtp SMTP libesmtp) \
 		$(use_with odbc ODBC $(usex iodbc iODBC unixODBC)) \
 		--with-charset=$(usex unicode utf-8 auto)
Comment 6 Fabian Groffen gentoo-dev 2018-05-03 06:44:19 UTC
SYSROOT is defined in EAPI=7 (there also ESYSROOT exists for EPREFIX usage).

@cpp: I assume SYSROOT comes from an eclass, would ${SYSROOT}${EPREFIX}/usr make sense to you here?
Comment 7 Sammy Pfeiffer 2018-05-03 07:12:06 UTC
(In reply to Fabian Groffen from comment #6)
> SYSROOT is defined in EAPI=7 (there also ESYSROOT exists for EPREFIX usage).
> 
> @cpp: I assume SYSROOT comes from an eclass, would ${SYSROOT}${EPREFIX}/usr
> make sense to you here?

I just found that in the apache eclass:

https://gitweb.gentoo.org/repo/gentoo.git/tree/eclass/apache-2.eclass#n538

They do it exactly how you wrote Fabian.

By the way, I haven't managed to find where are these variables defined (SYSROOT, EPREFIX, D, ED...), I just see them magically used. Could you point me to where they are defined? Thank you, and sorry for the offtopic.
Comment 8 Fabian Groffen gentoo-dev 2018-05-03 07:58:49 UTC
They come from Portage and are part of the standard set:
https://dev.gentoo.org/~ulm/pms/head/pms.html#x1-10800011
Comment 9 Larry the Git Cow gentoo-dev 2018-05-29 09:59:02 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=166f3e137df0294e79e03264df4416ab4d7878a8

commit 166f3e137df0294e79e03264df4416ab4d7878a8
Author:     Fabian Groffen <grobian@gentoo.org>
AuthorDate: 2018-05-29 09:58:30 +0000
Commit:     Fabian Groffen <grobian@gentoo.org>
CommitDate: 2018-05-29 09:58:53 +0000

    dev-libs/log4cxx: fix SYSROOT/EPREFIX usage, bug #654678
    
    Closes: https://bugs.gentoo.org/654678
    Package-Manager: Portage-2.3.24, Repoman-2.3.6

 dev-libs/log4cxx/log4cxx-0.10.0-r1.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)