Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error in mod_proxy_protocol on Alpine #6

Closed
nvmker opened this issue Nov 20, 2017 · 4 comments
Closed

Build error in mod_proxy_protocol on Alpine #6

nvmker opened this issue Nov 20, 2017 · 4 comments
Assignees
Labels

Comments

@nvmker
Copy link

nvmker commented Nov 20, 2017

Hi,
I've tried to build latest versions of proftpd and mod_proxy_protocol(both are cloned from github several minutes ago), and got a build error.

Here is output:

 ../libtool --mode=compile --tag=CC gcc -DHAVE_CONFIG_H  -DLINUX  -I.. -I../include -I../include -I/usr/include/libxml2 -I/usr/include/mysql -g2 -O2 -Wall -fno-omit-frame-pointer -Werror=implicit-function-declaration -DPR_SHARED_MODULE -c ../modules/mod_proxy_protocol.c
libtool: compile:  gcc -DHAVE_CONFIG_H -DLINUX -I.. -I../include -I../include -I/usr/include/libxml2 -I/usr/include/mysql -g2 -O2 -Wall -fno-omit-frame-pointer -Werror=implicit-function-declaration -DPR_SHARED_MODULE -c ../modules/mod_proxy_protocol.c  -fPIC -DPIC -o .libs/mod_proxy_protocol.o
../modules/mod_proxy_protocol.c: In function 'readv_sock':
../modules/mod_proxy_protocol.c:200:9: error: implicit declaration of function 'readv' [-Werror=implicit-function-declaration]
   res = readv(sockfd, iov, count);
         ^~~~~
cc1: some warnings being treated as errors
make[1]: *** [Makefile:34: mod_proxy_protocol.la] Error 1
make[1]: Leaving directory '/usr/local/proftpd/modules'
make: *** [Makefile:40: modules] Error 2

Configure command is:

./configure '--program-prefix=' '--disable-dependency-tracking' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libexecdir=/usr/libexec/proftpd' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--localstatedir=/var/run/proftpd' '--disable-auth-pam' '--disable-strip' '--enable-dso' '--enable-facl' '--disable-ipv6' '--enable-nls' '--enable-openssl' '--enable-ctrls' '--enable-pcre' '--enable-autoshadow' '--enable-tunable-buffer-size' '--enable-sendfile' '--enable-ipv6' '--enable-dso' '--with-libraries=/usr/lib' '--with-includes=/usr/include/mysql' '--with-includes=/usr/include/libxml2' '--with-modules=mod_aws:mod_readme:mod_dynmasq' '--with-shared=mod_wrap2:mod_wrap2_file:mod_wrap2_sql:mod_sql:mod_sql_passwd:mod_sql_mysql:mod_ban:mod_facl:mod_rewrite:mod_site_misc:mod_ifversion:mod_dnsbl:mod_qos:mod_sftp:mod_sftp_sql:mod_ifsession:mod_quotatab:mod_quotatab_file:mod_quotatab_sql:mod_exec:mod_digest:mod_geoip:mod_statcache:mod_proxy_protocol'
@Castaglia Castaglia self-assigned this Nov 20, 2017
@Castaglia Castaglia added the bug label Nov 20, 2017
@Castaglia
Copy link
Owner

Interesting. On what platform are you building? That is, what do the following commands show?

$ uname -a
$ cat /etc/lsb-release

I've not encountered this build error locally, nor did the Travis CI builds. Thus I'm wondering if it's a difference in the system header layout, for a relatively new/different distro...

@nvmker
Copy link
Author

nvmker commented Nov 21, 2017

It's a alpine 3.6, I've sent Dockerfile to your email.

@Castaglia Castaglia changed the title Build error in mod_proxy_protocol Build error in mod_proxy_protocol on Alpine Nov 21, 2017
@Castaglia
Copy link
Owner

Thanks! Using that, I was able to reproduce the problem. On Alpine, the readv(2) function is declared via sys/uio.h, which must be explicitly included.

Castaglia added a commit that referenced this issue Nov 21, 2017
Castaglia added a commit that referenced this issue Nov 21, 2017
Issue #6: Include the <sys/uio.h> header, when present. This fixes th…
@Castaglia
Copy link
Owner

Fixed in master. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants