Date: Mon, 14 May 2012 11:26:59 +0200 (CEST) From: Guido Falsi <madpilot@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org Cc: mm@FreeBSD.org Subject: ports/167865: [PATCH] net-im/jabberd: does not compile when WITHOUT_DEBUG is defined Message-ID: <3Vrc4M4mlVz2Ml@megatron.madpilot.net> Resent-Message-ID: <201205140930.q4E9U2Hw057666@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 167865 >Category: ports >Synopsis: [PATCH] net-im/jabberd: does not compile when WITHOUT_DEBUG is defined >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon May 14 09:30:02 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Guido Falsi >Release: FreeBSD 9.0-STABLE amd64 >Organization: >Environment: System: FreeBSD megatron.madpilot.net 9.0-STABLE FreeBSD 9.0-STABLE #5: Sun Apr 22 14:22:36 CEST 2012 root@megatron.madpilot.net:/usr/obj/usr/src/sys/MEGATRON amd64 >Description: When WITHOUT_DEBUG is activated the port fails to compile: /bin/sh ../libtool --quiet --tag=CC --mode=link cc -O2 -pipe -march=core2 -fno-strict-aliasing -funsigned-char -export-dynamic -L/usr/lib -L/usr/local/lib -rpath=/usr/lib:/usr/local/lib -L/usr/local/lib -o c2s c2s-authreg.o c2s-bind.o c2s-c2s.o c2s-main.o c2s-sm.o c2s-pbx.o c2s-pbx_commands.o ../sx/libsx.la ../mio/libmio.la ../util/libutil.la ../subst/libsubst.la -lssl -lcrypto -lgsasl -ludns -lidn -lexpat -lcrypt -lz c2s-main.o: In function `main': main.c:(.text+0x41d): undefined reference to `set_debug_log_from_config' main.c:(.text+0x14ce): undefined reference to `set_debug_log_from_config' *** Error code 1 1 error *** Error code 1 1 error *** Error code 2 1 error *** Error code 1 Stop in /usr/ports/net-im/jabberd. *** Error code 1 Stop in /usr/ports/net-im/jabberd. >How-To-Repeat: Disable teh DEBUG option in net-im/jabberd and try to compile the port. >Fix: Index: files/patch-c2s-main.c =================================================================== RCS file: files/patch-c2s-main.c diff -N files/patch-c2s-main.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-c2s-main.c 14 May 2012 09:18:06 -0000 @@ -0,0 +1,22 @@ +--- c2s/main.c.orig 2012-05-04 16:51:08.000000000 +0200 ++++ c2s/main.c 2012-05-14 10:27:43.507860771 +0200 +@@ -85,7 +85,9 @@ + int i; + stream_redirect_t sr; + ++#ifdef DEBUG + set_debug_log_from_config(c2s->config); ++#endif + + c2s->id = config_get_one(c2s->config, "id", 0); + if(c2s->id == NULL) +@@ -788,7 +790,9 @@ + mio_run(c2s->mio, mio_timeout); + + if(c2s_logrotate) { ++#ifdef DEBUG + set_debug_log_from_config(c2s->config); ++#endif + + log_write(c2s->log, LOG_NOTICE, "reopening log ..."); + log_free(c2s->log); Index: files/patch-router-main.c =================================================================== RCS file: files/patch-router-main.c diff -N files/patch-router-main.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-router-main.c 14 May 2012 09:18:06 -0000 @@ -0,0 +1,22 @@ +--- router/main.c.orig 2012-05-04 16:51:08.000000000 +0200 ++++ router/main.c 2012-05-14 10:35:59.700923855 +0200 +@@ -83,7 +83,9 @@ + if(r->id == NULL) + r->id = "router"; + ++#ifdef DEBUG + set_debug_log_from_config(r->config); ++#endif + + r->log_type = log_STDOUT; + if(config_get(r->config, "log") != NULL) { +@@ -447,7 +449,9 @@ + + if(router_logrotate) + { ++#ifdef DEBUG + set_debug_log_from_config(r->config); ++#endif + + log_write(r->log, LOG_NOTICE, "reopening log ..."); + log_free(r->log); Index: files/patch-s2s-main.c =================================================================== RCS file: files/patch-s2s-main.c diff -N files/patch-s2s-main.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-s2s-main.c 14 May 2012 09:18:06 -0000 @@ -0,0 +1,22 @@ +--- s2s/main.c.orig 2012-05-04 16:51:08.000000000 +0200 ++++ s2s/main.c 2012-05-14 10:36:24.341860936 +0200 +@@ -79,7 +79,9 @@ + config_elem_t elem; + int i, r; + ++#ifdef DEBUG + set_debug_log_from_config(s2s->config); ++#endif + + s2s->id = config_get_one(s2s->config, "id", 0); + if(s2s->id == NULL) +@@ -981,7 +983,9 @@ + now = time(NULL); + + if(s2s_logrotate) { ++#ifdef DEBUG + set_debug_log_from_config(s2s->config); ++#endif + + log_write(s2s->log, LOG_NOTICE, "reopening log ..."); + log_free(s2s->log); Index: files/patch-sm-main.c =================================================================== RCS file: files/patch-sm-main.c diff -N files/patch-sm-main.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-sm-main.c 14 May 2012 09:18:06 -0000 @@ -0,0 +1,22 @@ +--- sm/main.c.orig 2012-05-04 16:51:08.000000000 +0200 ++++ sm/main.c 2012-05-14 10:36:47.581892084 +0200 +@@ -105,7 +105,9 @@ + char *str; + config_elem_t elem; + ++#ifdef DEBUG + set_debug_log_from_config(sm->config); ++#endif + + sm->id = config_get_one(sm->config, "id", 0); + if(sm->id == NULL) +@@ -398,7 +400,9 @@ + mio_run(sm->mio, 5); + + if(sm_logrotate) { ++#ifdef DEBUG + set_debug_log_from_config(sm->config); ++#endif + + log_write(sm->log, LOG_NOTICE, "reopening log ..."); + log_free(sm->log); >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3Vrc4M4mlVz2Ml>