Bug 66510 - apr-1-config generates invalid iformation when called with a double '//'
Summary: apr-1-config generates invalid iformation when called with a double '//'
Status: NEW
Alias: None
Product: APR
Classification: Unclassified
Component: APR-util (show other bugs)
Version: 1.7.2
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache Portable Runtime bugs mailinglist
URL:
Keywords: FixedInTrunk, PatchAvailable
: 66523 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-03-06 06:40 UTC by Matthias Apitz
Modified: 2023-03-16 08:22 UTC (History)
2 users (show)



Attachments
Fix crosscompiling detection (2.08 KB, patch)
2023-03-08 07:42 UTC, Ruediger Pluem
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Apitz 2023-03-06 06:40:05 UTC
The tool apr-1-config generates broken information when called with a double // in the PATH, like (note the // before 'bin'):


/usr/local/sisis-pap/apache//bin/apr-1-config --includes
 -I/usr/local/sisis-pap/apache//bin/apr-1-config//usr/local/sisis-pap/apache/include

This happens if the location of APR is specified as for some other coponent's ./configure run as:

    --with-apr=/usr/local/sisis-pap/apache/

i.e. with a '/' at the end of the directory.
Comment 1 Ruediger Pluem 2023-03-08 07:42:54 UTC
Created attachment 38519 [details]
Fix crosscompiling detection

Does the attached patch fix the issue?
Keep in mind that due to the changes in configure.in you need to run buildconf first to regenerate the configure script. This requires autoconf to be installed.
Comment 2 Matthias Apitz 2023-03-08 13:29:49 UTC
I've applied the patch and built apr-1.7.2. It seems that the patch solves the problem:

sisis@srap51dxr1:~> /home/sisis/mpi-V73/devhome/sisis-pap/apr-1.7.2/apr-1-config --includes
 -I/home/sisis/mpi-V73/devhome/sisis-pap/apr-1.7.2/include

sisis@srap51dxr1:~> /home/sisis/mpi-V73/devhome/sisis-pap//apr-1.7.2/apr-1-config --includes
 -I/home/sisis/mpi-V73/devhome/sisis-pap/apr-1.7.2/include
Comment 3 Christian Folini 2023-03-10 07:40:53 UTC
I'm affected by this bug too on a standard Ubtunu 22.04 LTS.

Configuration / compilation of apr 1.7.2 with

$ ./configure --prefix=/usr/local/apr/

Bug after installation:

$ /usr/local/apr/bin/apr-1-config --includes
-I/usr/local/apr/bin/apr-1-config//usr/local/apr//include/apr-1


The patch by Ruediger solved the problem for me. Thank you.
Comment 4 Joe Orton 2023-03-10 08:52:17 UTC
(In reply to Ruediger Pluem from comment #1)
> Created attachment 38519 [details]
> Fix crosscompiling detection
> 
> Does the attached patch fix the issue?
> Keep in mind that due to the changes in configure.in you need to run
> buildconf first to regenerate the configure script. This requires autoconf
> to be installed.

+1 this looks good.
Comment 5 Ruediger Pluem 2023-03-10 10:54:53 UTC
Committed to trunk as r1908248.
Comment 6 Ruediger Pluem 2023-03-13 10:35:17 UTC
Backported to APR 1.7.x as r1908342 and APR 1.8.x as r1908343.
Comment 7 Ruediger Pluem 2023-03-14 08:23:29 UTC
*** Bug 66529 has been marked as a duplicate of this bug. ***
Comment 8 Joe Orton 2023-03-16 08:22:37 UTC
*** Bug 66523 has been marked as a duplicate of this bug. ***