hello
I encountered the following issue while compiling Dovecot on a Linux system with the Shenwei architecture in China using RPM:
During the build phase, it shows:
Copy Code
checking whether fd passing works... no
configure: error: fd passing is required for Dovecot to work
The version of Dovecot I am compiling is 2.3.16, and the version of the GCC tool is 8.5.0. My spec file's build section is as follows:
Copy Code
%build
# required for fdpass.c line 125,190: dereferencing type-punned pointer will break strict-aliasing rules
%global _hardened_build 1
export CFLAGS="%{__global_cflags} -fno-strict-aliasing -fstack-reuse=none"
export LDFLAGS="-Wl,-z,now -Wl,-z,relro %{?__global_ldflags}"
# el6 autoconf too old to regen; use packaged files (#1082384)
mkdir -p m4
autoreconf -I . -fiv # required for aarch64 support
%configure
INSTALL_DATA="install -c -p -m644"
--with-rundir=%{_rundir}/%{name}
--with-systemd
--docdir=%{_docdir}/%{name}
--disable-static
--disable-rpath
--with-nss
--with-shadow
--with-pam
--with-gssapi=plugin
--with-ldap=plugin
--with-sql=plugin
--with-pgsql
--with-mysql
--with-sqlite
--with-zlib
--with-libcap
--with-lucene
--with-ssl=openssl
--with-ssldir=%{ssldir}
--with-solr
--with-systemdsystemunitdir=%{_unitdir} \
--with-docs \
sed -i 's|/etc/ssl|/etc/pki/dovecot|' doc/mkcert.sh doc/example-config/conf.d/10-ssl.conf make %{?_smp_mflags} # pigeonhole pushd dovecot-2*3-pigeonhole-%{pigeonholever} # required for snapshot [ -f configure ] || autoreconf -fiv [ -f ChangeLog ] || echo "Pigeonhole ChangeLog is not available, yet" >ChangeLog %configure \ INSTALL_DATA="install -c -p -m644" \ --disable-static \ --with-dovecot=../ \ --without-unfinished-features make %{?_smp_mflags} popd
How is it possible that you have problems compiling a srpm? You must have changed something. What is even this el6? ;) If you want run dovecot on older el6 maybe try via docker?
I encountered the following issue while compiling Dovecot on a Linux system with the Shenwei architecture in China using RPM: During the build phase, it shows: Copy Code checking whether fd passing works... no configure: error: fd passing is required for Dovecot to work The version of Dovecot I am compiling is 2.3.16, and the version of the GCC tool is 8.5.0. My spec file's build section is as follows: Copy Code %build # required for fdpass.c line 125,190: dereferencing type-punned pointer will break strict-aliasing rules %global _hardened_build 1 export CFLAGS="%{__global_cflags} -fno-strict-aliasing -fstack- reuse=none" export LDFLAGS="-Wl,-z,now -Wl,-z,relro %{?__global_ldflags}" # el6 autoconf too old to regen; use packaged files (#1082384) mkdir -p m4 autoreconf -I . -fiv # required for aarch64 support %configure
INSTALL_DATA="install -c -p -m644"
--with-rundir=%{_rundir}/%{name}
--with-systemd
--docdir=%{_docdir}/%{name}
--disable-static
--disable-rpath
--with-nss
--with-shadow
--with-pam
--with-gssapi=plugin
--with-ldap=plugin
--with-sql=plugin
--with-pgsql
--with-mysql
--with-sqlite
--with-zlib
--with-libcap
--with-lucene
--with-ssl=openssl
--with-ssldir=%{ssldir}
--with-solr
--with-systemdsystemunitdir=%{_unitdir}
--with-docs
sed -i 's|/etc/ssl|/etc/pki/dovecot|' doc/mkcert.sh doc/example- config/conf.d/10-ssl.conf make %{?_smp_mflags} # pigeonhole pushd dovecot-2*3-pigeonhole-%{pigeonholever} # required for snapshot [ -f configure ] || autoreconf -fiv [ -f ChangeLog ] || echo "Pigeonhole ChangeLog is not available, yet" >ChangeLog %configure
INSTALL_DATA="install -c -p -m644" \ --disable-static \ --with- dovecot=../ \ --without-unfinished-features make %{?_smp_mflags} popd
Hi, I haven't changed anything, I compile it on x86 and arm. That is, when compiling on the domestic Shenwei architecture, this error will occur, which aspect should I go to check? I have checked the official website community questions and answers, and some people have also met this problem, but I have tried many ways to solve the problem, I hope you can provide me with an idea, thank you. Best wishes Bowen Wang
---- 回复的原邮件 ---- | 发件人 | Marcmarc@f1-outsourcing.eu | | 发送日期 | 2024年09月26日 21:32 | | 收件人 | wbw78281234 wbw78281234@163.com, dovecot@dovecot.orgdovecot@dovecot.org | | 主题 | RE: (无主题) | How is it possible that you have problems compiling a srpm? You must have changed something. What is even this el6? ;) If you want run dovecot on older el6 maybe try via docker?
I encountered the following issue while compiling Dovecot on a Linux system with the Shenwei architecture in China using RPM: During the build phase, it shows: Copy Code checking whether fd passing works... no configure: error: fd passing is required for Dovecot to work The version of Dovecot I am compiling is 2.3.16, and the version of the GCC tool is 8.5.0. My spec file's build section is as follows: Copy Code %build # required for fdpass.c line 125,190: dereferencing type-punned pointer will break strict-aliasing rules %global _hardened_build 1 export CFLAGS="%{__global_cflags} -fno-strict-aliasing -fstack- reuse=none" export LDFLAGS="-Wl,-z,now -Wl,-z,relro %{?__global_ldflags}" # el6 autoconf too old to regen; use packaged files (#1082384) mkdir -p m4 autoreconf -I . -fiv # required for aarch64 support %configure
INSTALL_DATA="install -c -p -m644"
--with-rundir=%{_rundir}/%{name}
--with-systemd
--docdir=%{_docdir}/%{name}
--disable-static
--disable-rpath
--with-nss
--with-shadow
--with-pam
--with-gssapi=plugin
--with-ldap=plugin
--with-sql=plugin
--with-pgsql
--with-mysql
--with-sqlite
--with-zlib
--with-libcap
--with-lucene
--with-ssl=openssl
--with-ssldir=%{ssldir}
--with-solr
--with-systemdsystemunitdir=%{_unitdir}
--with-docs
sed -i 's|/etc/ssl|/etc/pki/dovecot|' doc/mkcert.sh doc/example- config/conf.d/10-ssl.conf make %{?_smp_mflags} # pigeonhole pushd dovecot-2*3-pigeonhole-%{pigeonholever} # required for snapshot [ -f configure ] || autoreconf -fiv [ -f ChangeLog ] || echo "Pigeonhole ChangeLog is not available, yet" >ChangeLog %configure
INSTALL_DATA="install -c -p -m644" \ --disable-static \ --with- dovecot=../ \ --without-unfinished-features make %{?_smp_mflags} popd
The error you're encountering during the build process for Dovecot 2.3.16—specifically, "checking whether fd passing works... no"—likely relates to missing dependencies or system capabilities for file descriptor (fd) passing. File descriptor passing is typically required for IPC (Inter-Process Communication) between processes and is often linked to the socket and file handling mechanisms in Unix-like operating systems.
Here are some suggestions and troubleshooting steps you can take to address this issue:
1. *Install Required Libraries for FD Passing*
Ensure that the necessary libraries and kernel capabilities for file descriptor passing are available on your system. These may include:
- *libcap*: This is necessary for capabilities handling in Linux. The |--with-libcap| flag suggests you are already trying to link against it.
- *libc*: Make sure the GNU C library (glibc) is up-to-date, as this supports file descriptor passing.
- *Linux kernel version*: Ensure that the Linux kernel you're building on supports file descriptor passing (fd passing is supported in most modern Linux kernels, but older versions might lack it).
If you're building on a system like RHEL or CentOS, you may need to install development packages related to these libraries using a command like:
|sudo yum install libcap-devel |
2. *Configure Options for fd Passing*
Ensure that the system checks for fd passing capabilities and other related checks are not being overridden. Sometimes, the |autoreconf| or |configure| steps may fail if certain options are incorrectly set. Revisit the |configure| options in your spec file and consider adjusting them to explicitly enable fd passing:
|--enable-fd-passing |
This flag might not exist explicitly for Dovecot, but it ensures the system checks aren't being skipped.
3. *Kernel Capabilities*
File descriptor passing might be disabled in your system if the kernel capabilities are restricted. Ensure that:
- Your kernel has support for |SO_PASSCRED| (used for file descriptor passing).
- SELinux or other security frameworks aren't blocking IPC mechanisms.
You can check kernel configuration and modules by running:
|zgrep CONFIG_FD_PASSING /proc/config.gz |
If it's not enabled, you might need to recompile the kernel with this option, though this is a rare case for modern distributions.
4. *Ensure Correct Autotools and Compiler Configuration*
The error may also be linked to outdated |autoconf|, |automake|, or |libtool| versions. You mentioned that for EL6, the autoconf is too old. Consider updating them if possible, or ensuring you are using the latest versions:
|sudo yum install autoconf automake libtool |
You can also explicitly set paths to the correct versions of these tools by exporting them in your build script.
5. *Examine the Build Logs*
Check the full build logs for more detailed errors around fd passing. The specific point in the build process where this check fails might give you more clues. Running the |configure| command manually outside of the spec file to see the full output might also help:
|./configure --with-all-your-flags-here |
6. *Modify Build Flags*
The build flags you're using (|-fno-strict-aliasing -fstack-reuse=none|) may affect some optimizations. Consider compiling without these flags to see if that resolves the issue:
|export CFLAGS="%{__global_cflags}" export LDFLAGS="%{?__global_ldflags}" |
This would help determine if the issue is related to these flags.
Am 26.09.2024 um 18:14 schrieb wbw78281234 via dovecot:
During the build phase, it shows: Copy Code checking whether fd passing works... no configure: error: fd passing is required for Dovecot to work The version of Dovecot I am compiling is 2.3.16, and the version of the GCC tool is 8.5.0. My spec file's build section is as follows: Copy Code %build # required for fdpass.c line 125,190: dereferencing type-punned pointer will break strict-aliasing rules %global _hardened_build 1 export CFLAGS="%{__global_cflags} -fno-strict-aliasing -fstack- reuse=none" export LDFLAGS="-Wl,-z,now -Wl,-z,relro %{?__global_ldflags}" # el6 autoconf too old to regen; use packaged files (#1082384) mkdir -p m4 autoreconf -I . -fiv # required for aarch64 support %configure
INSTALL_DATA="install -c -p -m644"
--with-rundir=%{_rundir}/%{name}
--with-systemd
--docdir=%{_docdir}/%{name}
--disable-static
--disable-rpath
--with-nss
--with-shadow
--with-pam
--with-gssapi=plugin
--with-ldap=plugin
--with-sql=plugin
--with-pgsql
--with-mysql
--with-sqlite
--with-zlib
--with-libcap
--with-lucene
--with-ssl=openssl
--with-ssldir=%{ssldir}
--with-solr
--with-systemdsystemunitdir=%{_unitdir}
--with-docs
sed -i 's|/etc/ssl|/etc/pki/dovecot|' doc/mkcert.sh doc/example- config/conf.d/10-ssl.conf make %{?_smp_mflags} # pigeonhole pushd dovecot-2*3-pigeonhole-%{pigeonholever} # required for snapshot [ -f configure ] || autoreconf -fiv [ -f ChangeLog ] || echo "Pigeonhole ChangeLog is not available, yet" >ChangeLog %configure
INSTALL_DATA="install -c -p -m644" \ --disable-static \ --with- dovecot=../ \ --without-unfinished-features make %{?_smp_mflags} popd
participants (3)
-
Marc
-
Robert Nowotny
-
wbw78281234