Bug 175746 - [PATCH] irc/eggdrop: Fix build with clang
Summary: [PATCH] irc/eggdrop: Fix build with clang
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Beech Rintoul
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-31 23:40 UTC by Bryan Drewery
Modified: 2013-02-25 21:30 UTC (History)
0 users

See Also:


Attachments
patch-eggdrop-clang.txt (5.46 KB, patch)
2013-01-31 23:40 UTC, Bryan Drewery
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bryan Drewery freebsd_committer freebsd_triage 2013-01-31 23:40:00 UTC
	irc/eggdrop does not build with clang.

	Linking eggdrop (standard build).

	clang -o ../eggdrop bg.o botcmd.o botmsg.o botnet.o chanprog.o cmds.o dcc.o  dccutil.o dns.o flags.o language.o match.o main.o mem.o misc.o misc_file.o  modules.o net.o rfc1459.o tcl.o tcldcc.o tclhash.o tclmisc.o tcluser.o  userent.o userrec.o users.o  -L/usr/local/lib -ltcl85 -lm -lpthread md5/md5c.o compat/*.o `cat mod/mod.xlibs`
	match.o: In function `cron_match':
	/wrkdirs/tmp/match.tmp.91amd64-job-08.77401.i:(.text+0xb9f): undefined reference to `cron_matchfld'
	/wrkdirs/tmp/match.tmp.91amd64-job-08.77401.i:(.text+0xbc5): undefined reference to `cron_matchfld'
	main.o: In function `mainloop':
	/wrkdirs/tmp/main.tmp.91amd64-job-08.82472.i:(.text+0x3f8): undefined reference to `garbage_collect_tclhash'
	modules.o:(.data+0x380): undefined reference to `open_listen'
	tcldcc.o: In function `tcl_listen':
	/wrkdirs/tmp/tcldcc.tmp.91amd64-job-08.28665.i:(.text+0x263e): undefined reference to `open_listen'
	clang: error: linker command failed with exit code 1 (use -v to see invocation)
	*** [../eggdrop] Error code 1

	Stop in /wrkdirs/usr/ports/irc/eggdrop/work/eggdrop1.6.21/src.
	*** [modegg] Error code 1

	Stop in /wrkdirs/usr/ports/irc/eggdrop/work/eggdrop1.6.21.
	*** [do-build] Error code 1

	Stop in /usr/ports/irc/eggdrop.
	===>  Cleaning for eggdrop-1.6.21
	build of /usr/ports/irc/eggdrop ended at Fri Jan 25 19:53:48 UTC 2013

Fix: Apply attached patch (mirrored at http://people.freebsd.org/~bdrewery/patch-eggdrop-clang.txt)
	Patches obtained from NetBSD: http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/chat/eggdrop/patches/
How-To-Repeat: 	Add to /etc/make.conf and build:

	CC=clang
	CXX=clang++
	CPP=clang-cpp
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-01-31 23:40:14 UTC
Responsible Changed
From-To: freebsd-ports-bugs->beech

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2013-02-25 21:21:52 UTC
Author: beech
Date: Mon Feb 25 21:21:37 2013
New Revision: 312941
URL: http://svnweb.freebsd.org/changeset/ports/312941

Log:
  -Fix build with clang
  - Shorten Makefile header
  
  PR:		ports/175746
  Submitted by:	Bryan Drewery <bdrewery@FreeBSD.org>

Added:
  head/irc/eggdrop/files/patch-src_match.c   (contents, props changed)
  head/irc/eggdrop/files/patch-src_net.c   (contents, props changed)
  head/irc/eggdrop/files/patch-src_proto.h   (contents, props changed)
  head/irc/eggdrop/files/patch-src_tclhash.c   (contents, props changed)
  head/irc/eggdrop/files/patch-src_tclhash.h   (contents, props changed)
Modified:
  head/irc/eggdrop/Makefile   (contents, props changed)

Modified: head/irc/eggdrop/Makefile
==============================================================================
--- head/irc/eggdrop/Makefile	Mon Feb 25 19:52:42 2013	(r312940)
+++ head/irc/eggdrop/Makefile	Mon Feb 25 21:21:37 2013	(r312941)
@@ -1,12 +1,9 @@
-# New ports collection makefile for:	eggdrop
-# Date created:				18.01.2003
-# Whom:						Ulrich Spoerlein <q@uni.de>
-#
+# Created by: Ulrich Spoerlein <q@uni.de>
 # $FreeBSD$
-#
 
 PORTNAME=	eggdrop
 PORTVERSION=	1.6.21
+PORTREVISION=	1
 CATEGORIES=	irc
 MASTER_SITES=	ftp://ftp.eggheads.org/pub/eggdrop/source/1.6/
 DISTNAME=	${PORTNAME}${PORTVERSION}

Added: head/irc/eggdrop/files/patch-src_match.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/irc/eggdrop/files/patch-src_match.c	Mon Feb 25 21:21:37 2013	(r312941)
@@ -0,0 +1,13 @@
+$NetBSD: patch-src_match.c,v 1.1 2012/11/16 00:35:28 joerg Exp $
+
+--- src/match.c.orig	2012-11-15 10:29:42.000000000 +0000
++++ src/match.c
+@@ -367,7 +367,7 @@ int cidr_match(char *m, char *n, int cou
+ /* Inline for cron_match (obviously).
+  * Matches a single field of a crontab expression.
+  */
+-inline int cron_matchfld(char *mask, int match)
++static inline int cron_matchfld(char *mask, int match)
+ {
+   int skip = 0, f, t;
+   char *p, *q;

Added: head/irc/eggdrop/files/patch-src_net.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/irc/eggdrop/files/patch-src_net.c	Mon Feb 25 21:21:37 2013	(r312941)
@@ -0,0 +1,13 @@
+$NetBSD: patch-src_net.c,v 1.1 2012/11/16 00:35:28 joerg Exp $
+
+--- src/net.c.orig	2012-11-15 10:30:07.000000000 +0000
++++ src/net.c
+@@ -564,7 +564,7 @@ int open_address_listen(IP addr, int *po
+ /* Returns a socket number for a listening socket that will accept any
+  * connection -- port # is returned in port
+  */
+-inline int open_listen(int *port)
++int open_listen(int *port)
+ {
+   return open_address_listen(myip[0] ? getmyip() : INADDR_ANY, port);
+ }

Added: head/irc/eggdrop/files/patch-src_proto.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/irc/eggdrop/files/patch-src_proto.h	Mon Feb 25 21:21:37 2013	(r312941)
@@ -0,0 +1,13 @@
+$NetBSD: patch-src_proto.h,v 1.1 2012/11/16 00:35:28 joerg Exp $
+
+--- src/proto.h.orig	2012-11-15 10:30:20.000000000 +0000
++++ src/proto.h
+@@ -271,7 +271,7 @@ int getsock(int);
+ void killsock(int);
+ void killtclsock(int);
+ int answer(int, char *, unsigned long *, unsigned short *, int);
+-inline int open_listen(int *);
++int open_listen(int *);
+ int open_address_listen(IP addr, int *);
+ int open_telnet(char *, int);
+ int open_telnet_dcc(int, char *, char *);

Added: head/irc/eggdrop/files/patch-src_tclhash.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/irc/eggdrop/files/patch-src_tclhash.c	Mon Feb 25 21:21:37 2013	(r312941)
@@ -0,0 +1,13 @@
+$NetBSD: patch-src_tclhash.c,v 1.1 2012/11/16 00:35:28 joerg Exp $
+
+--- src/tclhash.c.orig	2012-11-15 10:32:40.000000000 +0000
++++ src/tclhash.c
+@@ -109,7 +109,7 @@ static inline void tcl_bind_list_delete(
+   nfree(tl);
+ }
+ 
+-inline void garbage_collect_tclhash(void)
++void garbage_collect_tclhash(void)
+ {
+   tcl_bind_list_t *tl, *tl_next, *tl_prev;
+   tcl_bind_mask_t *tm, *tm_next, *tm_prev;

Added: head/irc/eggdrop/files/patch-src_tclhash.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/irc/eggdrop/files/patch-src_tclhash.h	Mon Feb 25 21:21:37 2013	(r312941)
@@ -0,0 +1,13 @@
+$NetBSD: patch-src_tclhash.h,v 1.1 2012/11/16 00:35:28 joerg Exp $
+
+--- src/tclhash.h.orig	2012-11-15 10:32:27.000000000 +0000
++++ src/tclhash.h
+@@ -75,7 +75,7 @@ typedef struct tcl_bind_list_b {
+ 
+ #ifndef MAKING_MODS
+ 
+-inline void garbage_collect_tclhash(void);
++void garbage_collect_tclhash(void);
+ 
+ void init_bind(void);
+ void kill_bind(void);
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 Beech Rintoul freebsd_committer freebsd_triage 2013-02-25 21:22:14 UTC
State Changed
From-To: open->closed

Committed, Thanks!