nicm / fdm

fdm source code
268 stars 50 forks source link

Build fails on Kiss linux #71

Closed Vouivre closed 4 years ago

Vouivre commented 4 years ago

Hello,

I'm trying to build fdm on Kiss linux without success. Here is what I do:

./configure --prefix=/usr

make

I get after the make:

In file included from re.c:25:
fdm.h:728:1: warning: parameter names (without types) in function declaration
  728 | int b64_ntop(src, srclength, target, targsize);
      | ^~~
fdm.h:729:1: warning: parameter names (without types) in function declaration
  729 | int b64_pton(src, target, targsize);
      | ^~~
re.c: In function ‘re_block’:
re.c:85:43: error: ‘REG_STARTEND’ undeclared (first use in this function); did you mean ‘REG_EPAREN’?
   85 |  res = regexec(&re->re, buf, NPMATCH, pm, REG_STARTEND);
      |                                           ^~~~~~~~~~~~
      |                                           REG_EPAREN
re.c:85:43: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [Makefile:657: re.o] Error 1
make[1]: *** Waiting for unfinished jobs....
In file included from shm-mmap.c:26:
fdm.h:728:1: warning: parameter names (without types) in function declaration
  728 | int b64_ntop(src, srclength, target, targsize);
      | ^~~
fdm.h:729:1: warning: parameter names (without types) in function declaration
  729 | int b64_pton(src, target, targsize);
      | ^~~
In file included from strb.c:26:
fdm.h:728:1: warning: parameter names (without types) in function declaration
  728 | int b64_ntop(src, srclength, target, targsize);
      | ^~~
fdm.h:729:1: warning: parameter names (without types) in function declaration
  729 | int b64_pton(src, target, targsize);
      | ^~~
In file included from timer.c:25:
fdm.h:728:1: warning: parameter names (without types) in function declaration
  728 | int b64_ntop(src, srclength, target, targsize);
      | ^~~
fdm.h:729:1: warning: parameter names (without types) in function declaration
  729 | int b64_pton(src, target, targsize);
      | ^~~
make[1]: Leaving directory '/home/user/.cache/kiss/sources/fdm/fdm-2.0'
make: *** [Makefile:473: all] Error 2

I don't know if it can help, on Kiss linux libressl is used and musl.

Do you have any idea what can the problem ? Thank you!

nicm commented 4 years ago

You will need to use pcre (--enable-pcre) on platforms without REG_STARTEND.

On Wed, 6 Nov 2019, 17:50 tristelune1, notifications@github.com wrote:

Hello,

I'm trying to build fdm on Kiss linux without success. Here is what I do:

./configure --prefix=/usr

make

I get after the make:

In file included from re.c:25:

fdm.h:728:1: warning: parameter names (without types) in function declaration

728 | int b64_ntop(src, srclength, target, targsize);

  | ^~~

fdm.h:729:1: warning: parameter names (without types) in function declaration

729 | int b64_pton(src, target, targsize);

  | ^~~

re.c: In function ‘re_block’:

re.c:85:43: error: ‘REG_STARTEND’ undeclared (first use in this function); did you mean ‘REG_EPAREN’?

85 | res = regexec(&re->re, buf, NPMATCH, pm, REG_STARTEND);

  |                                           ^~~~~~~~~~~~

  |                                           REG_EPAREN

re.c:85:43: note: each undeclared identifier is reported only once for each function it appears in

make[1]: *** [Makefile:657: re.o] Error 1

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

In file included from shm-mmap.c:26:

fdm.h:728:1: warning: parameter names (without types) in function declaration

728 | int b64_ntop(src, srclength, target, targsize);

  | ^~~

fdm.h:729:1: warning: parameter names (without types) in function declaration

729 | int b64_pton(src, target, targsize);

  | ^~~

In file included from strb.c:26:

fdm.h:728:1: warning: parameter names (without types) in function declaration

728 | int b64_ntop(src, srclength, target, targsize);

  | ^~~

fdm.h:729:1: warning: parameter names (without types) in function declaration

729 | int b64_pton(src, target, targsize);

  | ^~~

In file included from timer.c:25:

fdm.h:728:1: warning: parameter names (without types) in function declaration

728 | int b64_ntop(src, srclength, target, targsize);

  | ^~~

fdm.h:729:1: warning: parameter names (without types) in function declaration

729 | int b64_pton(src, target, targsize);

  | ^~~

make[1]: Leaving directory '/home/macquat/.cache/kiss/sources/fdm/fdm-2.0'

make: *** [Makefile:473: all] Error 2

I don't know if it can help, on Kiss linux libressl is used and musl.

Do you have any idea what can the problem ? Thank you!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/nicm/fdm/issues/71?email_source=notifications&email_token=AACKI44TY5QKKMSPAX3HE3DQSL7U7A5CNFSM4JJZERSKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HXJWLIQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACKI46JWNG5CUGVC7SIURDQSL7U7ANCNFSM4JJZERSA .

Vouivre commented 4 years ago

Thank you, unfortunately I'm still not able to compile it with --enable-pcre. I get the following:

.
.
.
.
.
depbase=`echo compat/strtonum.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DPACKAGE_NAME=\"fdm\" -DPACKAGE_TARNAME=\"fdm\" -DPACKAGE_VERSION=\"2.0\" -DPACKAGE_STRING=\"fdm\ 2.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"fdm\" -DVERSION=\"2.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_QUEUE_H=1 -DHAVE_SYS_TREE_H=1 -DHAVE_MREMAP=1 -DHAVE_SETRESUID=1 -DHAVE_SETRESGID=1 -DHAVE_STRLCPY=1 -DHAVE_STRLCAT=1 -I.   -I/usr/local/include -DPCRE -DSYSCONFFILE="\"/etc/fdm.conf\"" -DSYSLOCKFILE="\"/var/run/fdm.lock\""   -O3 -pipe -march=native -D_GNU_SOURCE -std=gnu99 -O2  -MT compat/strtonum.o -MD -MP -MF $depbase.Tpo -c -o compat/strtonum.o compat/strtonum.c &&\
mv -f $depbase.Tpo $depbase.Po
In file included from ./fdm.h:23,
                 from compat/strtonum.c:25:
/usr/include/sys/cdefs.h:1:2: warning: #warning usage of non-standard #include <sys/cdefs.h> is deprecated [-Wcpp]
    1 | #warning usage of non-standard #include <sys/cdefs.h> is deprecated
      |  ^~~~~~~
In file included from lex.c:28:
fdm.h:728:1: warning: parameter names (without types) in function declaration
  728 | int b64_ntop(src, srclength, target, targsize);
      | ^~~
fdm.h:729:1: warning: parameter names (without types) in function declaration
  729 | int b64_pton(src, target, targsize);
      | ^~~
In file included from compat/strtonum.c:25:
./fdm.h:728:1: warning: parameter names (without types) in function declaration
  728 | int b64_ntop(src, srclength, target, targsize);
      | ^~~
./fdm.h:729:1: warning: parameter names (without types) in function declaration
  729 | int b64_pton(src, target, targsize);
      | ^~~
gcc  -O3 -pipe -march=native -D_GNU_SOURCE -std=gnu99 -O2   -L/usr/local/lib -o fdm attach.o buffer.o cache-op.o child-deliver.o child-fetch.o child.o cleanup.o command.o connect.o db-tdb.o deliver-add-header.o deliver-add-to-cache.o deliver-drop.o deliver-imap.o deliver-keep.o deliver-maildir.o deliver-mbox.o deliver-pipe.o deliver-remove-from-cache.o deliver-remove-header.o deliver-rewrite.o deliver-smtp.o deliver-stdout.o deliver-tag.o deliver-write.o fdm.o fetch-imap.o fetch-imappipe.o fetch-maildir.o fetch-mbox.o fetch-nntp.o fetch-pop3.o fetch-pop3pipe.o fetch-stdin.o file.o imap-common.o io.o log.o lookup-passwd.o lookup.o mail-state.o mail-time.o mail.o match-account.o match-age.o match-all.o match-attachment.o match-command.o match-in-cache.o match-matched.o match-regexp.o match-size.o match-string.o match-tagged.o match-unmatched.o netrc.o parent-deliver.o parent-fetch.o parse-fn.o pcre.o pop3-common.o privsep.o re.o replace.o shm-mmap.o strb.o timer.o xmalloc.o parse.o lex.o compat/base64.o   compat/strtonum.o compat/base64.o  -lssl -lcrypto -lz -ltdb  -lpcre -lresolv
/usr/lib/gcc/x86_64-pc-linux-musl/9.2.0/../../../../x86_64-pc-linux-musl/bin/ld: compat/base64.o: in function `b64_ntop':
base64.c:(.text+0x0): multiple definition of `b64_ntop'; compat/base64.o:base64.c:(.text+0x0): first defined here
/usr/lib/gcc/x86_64-pc-linux-musl/9.2.0/../../../../x86_64-pc-linux-musl/bin/ld: compat/base64.o: in function `b64_pton':
base64.c:(.text+0x1c0): multiple definition of `b64_pton'; compat/base64.o:base64.c:(.text+0x1c0): first defined here
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:572: fdm] Error 1
make[1]: Leaving directory '/home/user/.cache/kiss/build-24953/fdm'
make: *** [Makefile:473: all] Error 2
!> fdm Build failed

On Void linux, I saw a file base64.c was added to the package. But I don't know what to do with it. I tried to copy it in the compat directory, but it didn't help.

nicm commented 4 years ago

What compiler and compiler version are you using? What is in the config.log file?

On Wed, 6 Nov 2019 at 22:26, tristelune1 notifications@github.com wrote:

Thank you, unfortunately I'm still not able to compile it with --enable-pcre. I get the following:

. . . . . depbase=echo compat/strtonum.o | sed 's|[^/]*$|.deps/&|;s|\.o$||';\ gcc -DPACKAGE_NAME=\"fdm\" -DPACKAGE_TARNAME=\"fdm\" -DPACKAGE_VERSION=\"2.0\" -DPACKAGE_STRING=\"fdm\ 2.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"fdm\" -DVERSION=\"2.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_QUEUE_H=1 -DHAVE_SYS_TREE_H=1 -DHAVE_MREMAP=1 -DHAVE_SETRESUID=1 -DHAVE_SETRESGID=1 -DHAVE_STRLCPY=1 -DHAVE_STRLCAT=1 -I. -I/usr/local/include -DPCRE -DSYSCONFFILE="\"/etc/fdm.conf\"" -DSYSLOCKFILE="\"/var/run/fdm.lock\"" -O3 -pipe -march=native -D_GNU_SOURCE -std=gnu99 -O2 -MT compat/strtonum.o -MD -MP -MF $depbase.Tpo -c -o compat/strtonum.o compat/strtonum.c &&\ mv -f $depbase.Tpo $depbase.Po In file included from ./fdm.h:23, from compat/strtonum.c:25: /usr/include/sys/cdefs.h:1:2: warning: #warning usage of non-standard #include <sys/cdefs.h> is deprecated [-Wcpp] 1 | #warning usage of non-standard #include <sys/cdefs.h> is deprecated | ^~~ In file included from lex.c:28: fdm.h:728:1: warning: parameter names (without types) in function declaration 728 | int b64_ntop(src, srclength, target, targsize); | ^~~ fdm.h:729:1: warning: parameter names (without types) in function declaration 729 | int b64_pton(src, target, targsize); | ^~~ In file included from compat/strtonum.c:25: ./fdm.h:728:1: warning: parameter names (without types) in function declaration 728 | int b64_ntop(src, srclength, target, targsize); | ^~~ ./fdm.h:729:1: warning: parameter names (without types) in function declaration 729 | int b64_pton(src, target, targsize); | ^~~ gcc -O3 -pipe -march=native -D_GNU_SOURCE -std=gnu99 -O2 -L/usr/local/lib -o fdm attach.o buffer.o cache-op.o child-deliver.o child-fetch.o child.o cleanup.o command.o connect.o db-tdb.o deliver-add-header.o deliver-add-to-cache.o deliver-drop.o deliver-imap.o deliver-keep.o deliver-maildir.o deliver-mbox.o deliver-pipe.o deliver-remove-from-cache.o deliver-remove-header.o deliver-rewrite.o deliver-smtp.o deliver-stdout.o deliver-tag.o deliver-write.o fdm.o fetch-imap.o fetch-imappipe.o fetch-maildir.o fetch-mbox.o fetch-nntp.o fetch-pop3.o fetch-pop3pipe.o fetch-stdin.o file.o imap-common.o io.o log.o lookup-passwd.o lookup.o mail-state.o mail-time.o mail.o match-account.o match-age.o match-all.o match-attachment.o match-command.o match-in-cache.o match-matched.o match-regexp.o match-size.o match-string.o match-tagged.o match-unmatched.o netrc.o parent-deliver.o parent-fetch.o parse-fn.o pcre.o pop3-common.o privsep.o re.o replace.o shm-mmap.o strb.o timer.o xmalloc.o parse.o lex.o compat/base64.o compat/strtonum.o compat/base64.o -lssl -lcrypto -lz -ltdb -lpcre -lresolv /usr/lib/gcc/x86_64-pc-linux-musl/9.2.0/../../../../x86_64-pc-linux-musl/bin/ld: compat/base64.o: in function b64_ntop': base64.c:(.text+0x0): multiple definition ofb64_ntop'; compat/base64.o:base64.c:(.text+0x0): first defined here /usr/lib/gcc/x86_64-pc-linux-musl/9.2.0/../../../../x86_64-pc-linux-musl/bin/ld: compat/base64.o: in function b64_pton': base64.c:(.text+0x1c0): multiple definition ofb64_pton'; compat/base64.o:base64.c:(.text+0x1c0): first defined here collect2: error: ld returned 1 exit status make[1]: [Makefile:572: fdm] Error 1 make[1]: Leaving directory '/home/user/.cache/kiss/build-24953/fdm' make: [Makefile:473: all] Error 2 !> fdm Build failed

On Void linux, I saw a file base64.c was added to the package. But I don't know what to do with it. I tried to copy it in the compat directory, but it didn't help.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/nicm/fdm/issues/71?email_source=notifications&email_token=AACKI4YUYVC2FTTH7LIZEVDQSNAAJA5CNFSM4JJZERSKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDIGRGA#issuecomment-550529176, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACKI46W6NIBYLLUNRXKPALQSNAAJANCNFSM4JJZERSA .

Vouivre commented 4 years ago

Compiler:

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-musl/9.2.0/lto-wrapper
Target: x86_64-pc-linux-musl
Configured with: ../gcc/configure --prefix=/usr --disable-multilib --disable-symvers --disable-libmpx --disable-libmudflap
--disable-libsanitizer --disable-werror --disable-fixed-point --disable-libstdcxx-pch --enable-checking=release --mandir=/usr/share/man --infodir=/usr/share/info --with-system-zlib --enable-__cxa_atexit --enable-default-pie --enable-default-ssp --enable-shared --enable-threads --enable-tls --enable-languages=c,c++ --build=x86_64-pc-linux-musl
Thread model: posix
gcc version 9.2.0 (GCC)

For config.log: content of config.log

nicm commented 4 years ago

This problem was fixed already, try building fdm from Git master.

Vouivre commented 4 years ago

Sorry, I didn't see it. I can confirm, I was able to build fdm and install it. I will test fdm, but probably I won't be able to package it for Kiss until there is a new release. I hope there will be one in the next weeks.

I let you close this issue after reading my comment.

Thank you for your help!

nicm commented 4 years ago

You could probably just take 519e41833c1f7d353c09d8d51bfd6d13d0cfc16c and 3232e537ccaba4417b25d9d70264e4a5533042da as patches.

On Fri, 8 Nov 2019 at 18:08, tristelune1 notifications@github.com wrote:

Sorry, I didn't see it. I can confirm, I was able to build fdm and install it. I will test fdm, but probably I won't be able to package it for Kiss until there is a new release. I hope there will be one in the next weeks.

I let you close this issue after reading my comment.

Thank you for your help!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

Vouivre commented 4 years ago

Thank you! I'll try it. It could still take some time, I'll try to do it next week. Thanks!