lftp: Fail to compile under glibc
Nobody has claimed this yet.
- Dominant language
- Makefile
- Stars
- 4.6k
- Forks
- 4k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 134
Description
lftp version: 4.9.2
target: x86_64
C library: glibc
package source repo revision: fe018482f83d51b9005c44d25652ea323aa338a2
openwrt source revision: SNAPSHOT https://github.com/openwrt/openwrt/commit/68f983ba4102faac55211c6c6e799641ed3e3da6
building host: Ubuntu 22.10 (Kinetic Kudu) x84_64
Problem description:
When I tried to build lftp from dirclean, the compilation stop with following error:
/bin/bash ../libtool --silent --tag=CXX --mode=link x86_64-openwrt-linux-gnu-g++ -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -fmacro-prefix-map=/mnt/Openwrt/src/openwrt/build_dir/target-x86_64_glibc/lftp-4.9.2=lftp-4.9.2 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -Wall -Wwrite-strings -Woverloaded-virtual -fno-exceptions -fno-rtti -fno-implement-inlines -module -avoid-version -rpath /usr/lib/lftp/4.9.2 -L/mnt/Openwrt/src/openwrt/staging_dir/toolchain-x86_64_gcc-11.3.0_glibc/usr/lib -L/mnt/Openwrt/src/openwrt/staging_dir/toolchain-x86_64_gcc-11.3.0_glibc/lib -znow -zrelro -o proto-ftp.la ftpclass.lo FtpListInfo.lo FtpDirList.lo ftp-opie.lo netkey.lo FileCopyFtp.lo liblftp-network.la -lncurses
libtool: warning: '/mnt/Openwrt/src/openwrt/staging_dir/toolchain-x86_64_gcc-11.3.0_glibc/lib/libstdc++.la' seems to be moved
/mnt/Openwrt/src/openwrt/staging_dir/toolchain-x86_64_gcc-11.3.0_glibc/lib/gcc/x86_64-openwrt-linux-gnu/11.3.0/../../../../x86_64-openwrt-linux-gnu/bin/ar:u' modifier ignored sinceD' is the default (seeU') /bin/bash ../libtool --silent --tag=CXX --mode=compile x86_64-openwrt-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../lib -I../lib -I../trio -I/usr/include -I/mnt/Openwrt/src/openwrt/staging_dir/toolchain-x86_64_gcc-11.3.0_glibc/usr/include -I/mnt/Openwrt/src/openwrt/staging_dir/toolchain-x86_64_gcc-11.3.0_glibc/include -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -fmacro-prefix-map=/mnt/Openwrt/src/openwrt/build_dir/target-x86_64_glibc/lftp-4.9.2=lftp-4.9.2 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -Wall -Wwrite-strings -Woverloaded-virtual -fno-exceptions -fno-rtti -fno-implement-inlines -MT proto_http_la-Http.lo -MD -MP -MF .deps/proto_http_la-Http.Tpo -c -o proto_http_la-Http.lotest -f 'Http.cc' || echo './'`Http.cc
In file included from /usr/include/openssl/ssl.h:21,
from lftp_ssl.h:27,
from Http.h:25,
from Http.cc:32:
/usr/include/openssl/macros.h:155:4: error: #error "OPENSSL_API_COMPAT expresses an impossible API compatibility level"
155 | # error "OPENSSL_API_COMPAT expresses an impossible API compatibility level"
| ^~~~~
make[6]: *** [Makefile:2401: proto_http_la-Http.lo] Error 1
make[6]: Leaving directory '/mnt/Openwrt/src/openwrt/build_dir/target-x86_64_glibc/lftp-4.9.2/src'
make[5]: *** [Makefile:1753: all-recursive] Error 1
make[5]: Leaving directory '/mnt/Openwrt/src/openwrt/build_dir/target-x86_64_glibc/lftp-4.9.2'
make[4]: *** [Makefile:1698: all] Error 2
make[4]: Leaving directory '/mnt/Openwrt/src/openwrt/build_dir/target-x86_64_glibc/lftp-4.9.2'
make[3]: *** [Makefile:66: /mnt/Openwrt/src/openwrt/build_dir/target-x86_64_glibc/lftp-4.9.2/.built] Error 2
make[3]: Leaving directory '/mnt/Openwrt/src/openwrt/feeds/packages/net/lftp'
time: package/feeds/packages/lftp/compile#36.84#7.92#43.26
ERROR: package/feeds/packages/lftp failed to build.
Compilation of the same codebase under musl completed successfully.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the lftp package build from feeds/packages/net/lftp on the glibc target, then inspect the failing include path through Http.cc, Http.h, and lftp_ssl.h into OpenSSL's ssl.h and macros.h. Compare the glibc and musl build configuration; done means lftp 4.9.2 compiles successfully for glibc without the OPENSSL_API_COMPAT error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100