Skip to content

configure: fix --without-lib*-prefix when lib* is detected anyway - #1506

Closed
vszakats wants to merge 3 commits into
libssh2:masterfrom
vszakats:am-fix-without-prefix
Closed

vszakats wants to merge 3 commits into
libssh2:masterfrom
vszakats:am-fix-without-prefix

Conversation

@vszakats

@vszakats vszakats commented Jan 2, 2025 •

Copy link
Copy Markdown
Member

Do not test the prefix when set to no.
(as with --without-lib*-prefix)

Before this patch this test was always made and when detected despite
the wrong prefix, the no prefix remained in LDFLAGS causing a build
failure later in libtool.

Fixes:

$ ../configure --without-libssl-prefix
[...]
../libtool: line 7756: cd: no/lib: No such file or directory
libtool:   error: cannot determine absolute directory name of 'no/lib'
make[2]: *** [libssh2.la] Error 1

Follow-up to d19b619 #1384

Reported-by: Christoph Reiter
Fixes #1505

```
$ ../configure --with-openssl --without-libssl-prefix
[...]
../libtool: line 7756: cd: no/lib: No such file or directory
libtool:   error: cannot determine absolute directory name of 'no/lib'
make[2]: *** [libssh2.la] Error 1
```

Regression from d19b619 libssh2#1384

Reported-by: Christoph Reiter
Fixes libssh2#1505
@vszakats

This comment was marked as resolved.

@vszakats vszakats changed the title configure: fix --without-lib*-prefix issues configure: fix --without-lib*-prefix when lib* is detected anyway Jan 2, 2025
@vszakats
vszakats marked this pull request as ready for review January 2, 2025 11:26
@vszakats

vszakats commented Jan 2, 2025 •

Copy link
Copy Markdown
Member Author

This fixes the --without-*_prefix case, but the build error can still be
triggered with --with-libssl-prefix=bogus. The issue is that when the
dependency check succeeds (because the dependency is on a system
path or a path already added by a preceding check), the tested prefix gets
added to LDFLAGS anyway, and libtool is breaking when it cannot
convert a relative, non-existing path to an absolute one. But, an absolute
path is expected with --with-*= options, so this shouldn't be an issue
in practice outside of the no case fixed in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1.11.1 fails to build with "--without-libssl-prefix"

1 participant