# ProFTPd v1.3.1-rc3 won't compile

## Simba7

Yep.. ProFTPd won't compile for some strange reason. My title says rc3, but I tried rc2 too with the same results.

I also noticed it was released awhile ago. How come it's still in rc stages here?

Here's the errors I've been getting:

```
config.status: creating config.h

config.status: executing default commands

echo \#define BUILD_STAMP \"`date`\" >include/buildstamp.h

cd lib/ && make lib

cd src/ && make src

make[1]: Entering directory `/var/tmp/portage/net-ftp/proftpd-1.3.1_rc2-r3/work/proftpd-1.3.1rc2/lib'

i586-pc-linux-gnu-gcc -DHAVE_CONFIG_H  -DLINUX  -I.. -I../include -I/usr/include/mysql -O2 -march=pentium-mmx -pipe -Wall -c pr_fnmatch.c

make[1]: Entering directory `/var/tmp/portage/net-ftp/proftpd-1.3.1_rc2-r3/work/proftpd-1.3.1rc2/src'

i586-pc-linux-gnu-gcc -DHAVE_CONFIG_H  -DLINUX  -I.. -I../include -I/usr/include/mysql -O2 -march=pentium-mmx -pipe -Wall -c main.c

In file included from /usr/include/asm/sigcontext.h:4,

                 from /usr/include/bits/sigcontext.h:28,

                 from /usr/include/signal.h:333,

                 from /usr/include/sys/wait.h:31,

                 from ../include/conf.h:95,

                 from pr_fnmatch.c:38:

/usr/include/asm/types.h:6: error: conflicting types for 'mode_t'

/usr/include/sys/types.h:72: error: previous declaration of 'mode_t' was here

In file included from /usr/include/asm/sigcontext.h:4,

                 from /usr/include/bits/sigcontext.h:28,

                 from /usr/include/signal.h:333,

                 from /usr/include/sys/wait.h:31,

                 from ../include/conf.h:95,

                 from main.c:32:

/usr/include/asm/types.h:6: error: conflicting types for 'mode_t'

/usr/include/sys/types.h:72: error: previous declaration of 'mode_t' was here

make[1]: *** [pr_fnmatch.o] Error 1

make[1]: Leaving directory `/var/tmp/portage/net-ftp/proftpd-1.3.1_rc2-r3/work/proftpd-1.3.1rc2/lib'

make: *** [lib] Error 2

make: *** Waiting for unfinished jobs....

i586-pc-linux-gnu-gcc -DHAVE_CONFIG_H  -DLINUX  -I.. -I../include -I/usr/include/mysql -O2 -march=pentium-mmx -pipe -Wall -c timers.c

main.c: In function 'shutdown_exit':

main.c:315: warning: passing argument 2 of 'signal' from incompatible pointer type

main.c: In function 'fork_server':

main.c:991: warning: passing argument 2 of 'signal' from incompatible pointer type

main.c:992: warning: passing argument 2 of 'signal' from incompatible pointer type

main.c: In function 'sig_restart':

main.c:1537: warning: passing argument 2 of 'signal' from incompatible pointer type

main.c: In function 'sig_evnt':

main.c:1542: warning: passing argument 2 of 'signal' from incompatible pointer type

main.c: In function 'sig_child':

main.c:1595: warning: passing argument 2 of 'signal' from incompatible pointer type

main.c: In function 'install_signal_handlers':

main.c:1848: warning: passing argument 2 of 'signal' from incompatible pointer type

main.c:1849: warning: passing argument 2 of 'signal' from incompatible pointer type

main.c:1850: warning: passing argument 2 of 'signal' from incompatible pointer type

main.c:1851: warning: passing argument 2 of 'signal' from incompatible pointer type

main.c:1852: warning: passing argument 2 of 'signal' from incompatible pointer type

main.c:1853: warning: passing argument 2 of 'signal' from incompatible pointer type

main.c:1854: warning: passing argument 2 of 'signal' from incompatible pointer type

main.c:1858: warning: passing argument 2 of 'signal' from incompatible pointer type

main.c:1860: warning: passing argument 2 of 'signal' from incompatible pointer type

main.c:1861: warning: passing argument 2 of 'signal' from incompatible pointer type

main.c:1864: warning: passing argument 2 of 'signal' from incompatible pointer type

main.c:1870: warning: passing argument 2 of 'signal' from incompatible pointer type

main.c:1872: warning: passing argument 2 of 'signal' from incompatible pointer type

In file included from /usr/include/asm/sigcontext.h:4,

                 from /usr/include/bits/sigcontext.h:28,

                 from /usr/include/signal.h:333,

                 from /usr/include/sys/wait.h:31,

                 from ../include/conf.h:95,

                 from timers.c:31:

/usr/include/asm/types.h:6: error: conflicting types for 'mode_t'

/usr/include/sys/types.h:72: error: previous declaration of 'mode_t' was here

make[1]: *** [main.o] Error 1

make[1]: *** Waiting for unfinished jobs....

timers.c: In function 'sig_alarm':

timers.c:154: warning: assignment from incompatible pointer type

timers.c: In function 'set_sig_alarm':

timers.c:183: warning: assignment from incompatible pointer type

make[1]: *** [timers.o] Error 1

make[1]: Leaving directory `/var/tmp/portage/net-ftp/proftpd-1.3.1_rc2-r3/work/proftpd-1.3.1rc2/src'

make: *** [src] Error 2

 *

 * ERROR: net-ftp/proftpd-1.3.1_rc2-r3 failed.

 * Call stack:

 *               ebuild.sh, line   46:  Called src_compile

 *             environment, line 2371:  Called die

 * The specific snippet of code:

 *       emake || diefunc "$FUNCNAME" "$LINENO" "$?" "emake failed"

 *  The die message:

 *   emake failed

 *

 * If you need support, post the topmost build error, and the call stack if relevant.

 * A complete build log is located at '/var/tmp/portage/net-ftp/proftpd-1.3.1_rc2-r3/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/net-ftp/proftpd-1.3.1_rc2-r3/temp/environment'.

 *
```

----------

## schachti

There's an ebuild for 1.3.1 in https://bugs.gentoo.org/show_bug.cgi?id=195135, you could try it.

What's the output of

```
emerge -pv proftpd
```

and

```
emerge --info
```

?

----------

## c3l5o

I'm having this problem with the regular ebuild from the portage tree andd the ebuild from the bugzilla... Same error while building...[/code]

```
# emerge -pv proftpd

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild  N    ] net-ftp/proftpd-1.3.1  USE="acl ncurses nls pam ssl tcpd -authfile -clamav -hardened -ifsession -ipv6 -ldap -mysql -noauthunix -opensslcrypt -postgres -radius -rewrite (-selinux) -shaper -sitemisc -softquota -vroot -xinetd" 0 kB [1]

Total: 1 package (1 new), Size of downloads: 0 kB

Portage tree and overlays:

 [0] /usr/portage

 [1] /usr/local/portage

```

```

emerge --info

Portage 2.1.4.4 (default-linux/x86/dev/2007.1, gcc-4.2.3, glibc-2.7-r1, 2.6.24-gentoo-r2 i686)

=================================================================

System uname: 2.6.24-gentoo-r2 i686 Intel(R) Pentium(R) 4 CPU 3.00GHz

Timestamp of tree: Wed, 27 Feb 2008 01:16:01 +0000

ccache version 2.4 [enabled]

app-shells/bash:     3.2_p33

dev-lang/python:     2.5.1-r5

dev-util/ccache:     2.4-r7

sys-apps/baselayout: 1.12.11.1

sys-apps/sandbox:    1.2.18.1-r2

sys-devel/autoconf:  2.13, 2.61-r1

sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1

sys-devel/binutils:  2.18-r1

sys-devel/gcc-config: 1.4.0-r4

sys-devel/libtool:   1.5.26

virtual/os-headers:  2.6.24

ACCEPT_KEYWORDS="x86 ~x86"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-O2 -march=prescott -pipe"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/4.0/env /usr/kde/4.0/share/config /usr/kde/4.0/shutdown /usr/share/config"

CONFIG_PROTECT_MASK="/etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"

CXXFLAGS="-O2 -march=prescott -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="ccache distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"

GENTOO_MIRRORS="ftp://darkstar.ist.utl.pt/pub/gentoo/ ftp://cesium.di.uminho.pt/pub/gentoo/ "

LANG="pt_PT.UTF-8"

LC_ALL="pt_PT.UTF-8"

LINGUAS="en pt"

MAKEOPTS="-j2"

PKGDIR="/usr/portage/packages"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY="/usr/portage/local/layman/sunrise /usr/local/portage"

SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"

USE="X acl acpi alsa arts bash-completion berkdb bindist bitmap-fonts bluetooth bzip2 cairo cli cracklib crypt cups curl dbus dri esd fam ffmpeg firefox flac fortran fuse gdbm gif gimp glitz gnome gpm gstreamer gtk gtk2 hal iconv imlib isdnlog javascript jpeg mad midi mmx mp3 mpd mudflap ncurses nls nptl nptlonly ogg opengl openmp oss pam pcre perl png pppd python qt4 readline reflection samba session spell spl sse sse2 ssl svg tcpd tiff truetype truetype-fonts type1 type1-fonts ugly unicode usb vim vim-syntax vorbis wmf wmv x86 xcomposite xml xorg xscreensaver xv xvid zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en pt" USERLAND="GNU" VIDEO_CARDS="fglrx"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

```

----------

## Chupa

I have the same problem.

----------

## c3l5o

It seems to be a problem with the linux-headers 2.6.24 :/

----------

## tgoodman

 *c3l5o wrote:*   

> It seems to be a problem with the linux-headers 2.6.24 :/

 

I have the same problem.

It seems that proftpd autoconfigure determines that umode_t doesn't exist (in /usr/include/asm/types.h) and redefines umode_t as mode_t.  This conflicts with mode_t in /usr/include/sys/types.h.

I don't know enough to know if it's a linux-headers 2.6.24 problem or a problem with proftpd autoconfig.

I worked around it by commenting out the #define umode_t mode_t line in config.h.

Todd

----------

## c3l5o

I just said it was a linux-headers problem because the old version is ok!

----------

## tgoodman

 *c3l5o wrote:*   

> I just said it was a linux-headers problem because the old version is ok!

 

I'm sorry, I don't mean to say it's not a linux-headers problem.

Just that it's a result of a configure check that defines umode_t as mode_t if it doesn't find it but that the headers included actually do have umode_t.

And I emerged about 240 packages and this is the only that failed with this problem too.   :Sad: 

Also, I didn't end up using the work around above but instead commented out the AC_CHECK_TYPE(umode_t, mode_t) line in configure.in.

Also, it seems that it always determines umode_t doesn't exist and redefines it, but in linux-headers-2.6.17-r1 asm/types.h doesn't end up getting included but in linux-headers-2.6.24 it does.

Todd

----------

## Crispy Beef

I had to same problem with proftpd-1.3.1_rc2-r3 and found this thread. Then I did a search for bugs and found this:

https://bugs.gentoo.org/show_bug.cgi?id=178643

I thought I'd give it a go and set MAKEOPTS in /etc/make.conf to -j1 as suggested and it worked! I'm running kernel 2.6.24-gentoo-r3 on amd64 with two dual core Opterons. Hope this helps somebody.

----------

## dantrell

 *schachti wrote:*   

> There's an ebuild for 1.3.1 in https://bugs.gentoo.org/show_bug.cgi?id=195135, you could try it.
> 
> [...]

 

I can confirm that installing proftpd-1.3.1 with the provided patch works.

Might be a good idea to do away with the release candidates and just get that version. After all, 1.3.1 was released on 2007-10-05 according to the main page (http://www.proftpd.org/).

----------

