Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 275481 - [PATCH] net-misc/ntp-4.2.4_p7 failed to compile with FreeBSD
Summary: [PATCH] net-misc/ntp-4.2.4_p7 failed to compile with FreeBSD
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All FreeBSD
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-26 12:27 UTC by Naohiro Aota
Modified: 2009-07-03 19:45 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Naohiro Aota gentoo-dev 2009-06-26 12:27:29 UTC
ntp-4.2.4_p7 failed to compile with FreeBSD because of duplicated
declaration of MD5Update.

With the patch below, I was able to compile it. 

--- /usr/portage/net-misc/ntp/ntp-4.2.4_p7.ebuild~	2009-06-22 23:06:43 +0900
+++ /usr/portage/net-misc/ntp/ntp-4.2.4_p7.ebuild	2009-06-26 19:59:04 +0900
@@ -51,7 +51,7 @@
 
 src_compile() {
 	# avoid libmd5/libelf
-	export ac_cv_search_MD5Init=no ac_cv_header_md_5=no
+	export ac_cv_search_MD5Init=no ac_cv_header_md_5=no ac_cv_header_md5_h=no
 	export ac_cv_lib_elf_nlist=no
 	# blah, no real configure options #176333
 	export ac_cv_header_dns_sd_h=$(use zeroconf && echo yes || echo no)


Reproducible: Always

Steps to Reproduce:
1.emerge =ntp-4.2.4_p7


Actual Results:  
emerge failed with the following error.

>>> Unpacking source...
<snip>
./configure --prefix=/usr --build=i686-gentoo-freebsd7.1 --host=i686-gentoo-freebsd7.1 --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-linuxcaps --disable-parse-clocks --enable-ipv6 --disable-debugging --with-crypto
<snip>
checking for md5.h... yes
<snip>
if i686-gentoo-freebsd7.1-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../include  -D_GNU_SOURCE -I/usr/include  -O2 -pipe -march=prescott --param l1-cache-size=16 --param l1-cache-line-size=64 -mtune=prescott  -Wall -Wcast-qual -Wmissing-prototypes -Wpointer-arith -Wshadow -Wno-strict-prototypes -Winit-self -MT md5c.o -MD -MP -MF ".deps/md5c.Tpo" -c -o md5c.o md5c.c; \
	then mv -f ".deps/md5c.Tpo" ".deps/md5c.Po"; else rm -f ".deps/md5c.Tpo"; exit 1; fi
md5c.c:120: error: conflicting types for 'MD5Update'
/usr/include/sys/md5.h:46: error: previous declaration of 'MD5Update' was here
gmake[2]: *** [md5c.o] Error 1
<snip>



Expected Results:
Comment 1 SpanKY gentoo-dev 2009-06-26 16:21:21 UTC
that would most likely break USE=ssl
Comment 2 Naohiro Aota gentoo-dev 2009-06-26 16:57:23 UTC
really? I was able to compile ntp with USE=ssl on both Linux and
FreeBSD.  And, it seems nothing to do with it.

HAVE_MD5INIT is only used in libntp/md5c.c.
HAVE_MD5_H is only used in include/ntp_md5.h.
include/ntp_md5.h is used in libntp/md5c.c and libntp/a_md5encrypt.c.
libntp/md5c.c seems nothing to do with openssl, and libntp/a_md5encrypt.c disables openssl by itself.

Comment 3 SpanKY gentoo-dev 2009-06-28 16:52:35 UTC
if you've tested the different USE configurations, that's good enough for me
Comment 4 Naohiro Aota gentoo-dev 2009-07-02 09:37:22 UTC
I could compile ntp with and without 'ssl' USE flag on FreeBSD, and I
couldn't compile it with and without 'ssl' USE flag on the same
machine.
Comment 5 Naohiro Aota gentoo-dev 2009-07-02 09:41:32 UTC
I've droped some words. :(
I wanted to write as following.

I could compile patched ntp ebuild with and without 'ssl' USE flag on
FreeBSD, and I couldn't compile unpatched ntp ebuild with and without
'ssl' USE flag on the same machine.
Comment 6 SpanKY gentoo-dev 2009-07-03 19:45:25 UTC
nm, the original code added to 4.2.4_p7 was a typo.  it shouldnt be "_md_5", it should be "_md5_h".

http://sources.gentoo.org/net-misc/ntp/ntp-4.2.4_p7.ebuild?r1=1.8&r2=1.9