Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Mar 2003 12:16:33 +0100 (CET)
From:      Martin Blapp <mb@levais.imp.ch>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/49070: [PATCH] librecode.so has unresolved symbols, add php support
Message-ID:  <200303101116.h2ABGXMW055183@levais.imp.ch>

next in thread | raw e-mail | index | archive | help

>Number:         49070
>Category:       ports
>Synopsis:       [PATCH] librecode.so has unresolved symbols, add php support
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 10 03:20:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Martin Blapp
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
ImproWare AG
>Environment:

librecode.so.3 with php4

>Description:

Linking with librecode.so fails due unresolved symbols.

config.log says:

configure:44401: checking for recode support
configure:44483: gcc -o conftest -g -O2  -DSUPPORT_UTF8 
-L/usr/local/lib conftest.c -lgd -lcrypt -lm  -lrecode 1>&5
/usr/local/lib/librecode.so: undefined reference to `error'
configure: failed program was:
#line 44472 "configure"
#include "confdefs.h"

>How-To-Repeat:

Try to add recode support to php4.

>Fix:

Fix librecode support for php4. The recode library did not work
at all before because it has unresolved symbols.

The fix can also be found on http://people.freebsd.org/~mbr/patches/patch-php+recode.diff

Index: www/mod_php4/scripts/configure.php
===================================================================
RCS file: /home/pcvs/ports/www/mod_php4/scripts/configure.php,v
retrieving revision 1.185
diff -u -r1.185 configure.php
--- www/mod_php4/scripts/configure.php	6 Mar 2003 15:01:15 -0000	1.185
+++ www/mod_php4/scripts/configure.php	10 Mar 2003 10:50:34 -0000
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $FreeBSD: ports/www/mod_php4/scripts/configure.php,v 1.185 2003/03/06 15:01:15 demon Exp $
+# $FreeBSD: ports/www/mod_php4/scripts/configure.php,v 1.183 2003/02/24 02:56:37 edwin Exp $
 
 if [ -f ${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc ]; then
 	exit
@@ -47,6 +47,7 @@
 CURL		"CURL support" OFF \
 gettext		"gettext library support" OFF \
 iconv		"iconv support" OFF \
+recode		"recode support" OFF \
 pspell		"pspell support" OFF \
 mbregex		"multibyte regular expressions module" OFF \
 mbstring	"multibyte string module" OFF \
@@ -314,6 +315,10 @@
 				echo "CONFIGURE_ARGS+=--with-iconv=\${LOCALBASE}"
 				ICONV=1
 			fi
+			;;
+		\"recode\")
+			echo "LIB_DEPENDS+=	recode.3:\${PORTSDIR}/converters/recode"
+			echo "CONFIGURE_ARGS+=--with-recode=\${LOCALBASE}"
 			;;
 		\"pspell\")
 			echo "LIB_DEPENDS+=	aspell.15:\${PORTSDIR}/textproc/aspell"
Index: converters/recode/files/patch-aa
===================================================================
RCS file: converters/recode/files/patch-aa
diff -N converters/recode/files/patch-aa
--- converters/recode/files/patch-aa	9 Sep 2001 09:17:09 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
---- src/Makefile.in.orig	Mon Jan 22 19:14:16 2001
-+++ src/Makefile.in	Thu Sep  6 11:21:43 2001
-@@ -131,7 +131,7 @@
- 
- librecode_la_SOURCES = argmatch.c charname.c combine.c fr-charname.c hash.c iconv.c libiconv.c localcharset.c merged.c names.c outer.c quotearg.c recode.c request.c strip-pool.c task.c xmalloc.c $(C_STEPS)
- 
--librecode_la_LDFLAGS = -version-info 0:0:0
-+librecode_la_LDFLAGS = -version-info 3:6:0
- 
- INCLUDES = -I.. -I$(srcdir) -I$(top_srcdir)/lib -I$(top_srcdir)/libiconv
- DEFS = -DLIBDIR=\"$(libdir)\" @DEFS@
Index: converters/recode/files/patch-lib-error.c
===================================================================
RCS file: converters/recode/files/patch-lib-error.c
diff -N converters/recode/files/patch-lib-error.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ converters/recode/files/patch-lib-error.c	10 Mar 2003 10:50:34 -0000
@@ -0,0 +1,33 @@
+--- lib/error.c.orig	Mon Mar 10 10:57:22 2003
++++ lib/error.c	Mon Mar 10 11:02:12 2003
+@@ -25,6 +25,18 @@
+ # include <config.h>
+ #endif
+ 
++# ifdef __FreeBSD__
++# include <sys/types.h>
++# include <sys/exec.h>
++# include <vm/vm.h>
++# include <vm/vm_param.h>
++# include <vm/pmap.h>
++# include <vm/swap_pager.h>
++# include <machine/param.h>
++# include <machine/vmparam.h>
++# include <machine/pmap.h>
++# endif
++
+ #include <stdio.h>
+ 
+ #if HAVE_VPRINTF || HAVE_DOPRNT || _LIBC
+@@ -80,7 +92,11 @@
+ 
+ /* The calling program should define program_name and set it to the
+    name of the executing program.  */
++# ifdef __FreeBSD__
++# define program_name *((struct ps_strings *)PS_STRINGS)->ps_argvstr
++# else
+ extern char *program_name;
++# endif
+ 
+ # ifdef HAVE_STRERROR_R
+ #  define __strerror_r strerror_r
Index: converters/recode/files/patch-src-Makefile.in
===================================================================
RCS file: converters/recode/files/patch-src-Makefile.in
diff -N converters/recode/files/patch-src-Makefile.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ converters/recode/files/patch-src-Makefile.in	10 Mar 2003 10:50:34 -0000
@@ -0,0 +1,20 @@
+--- src/Makefile.in.orig	Mon Jan 22 19:14:16 2001
++++ src/Makefile.in	Mon Mar 10 10:17:54 2003
+@@ -131,7 +131,7 @@
+ 
+ librecode_la_SOURCES = argmatch.c charname.c combine.c fr-charname.c hash.c iconv.c libiconv.c localcharset.c merged.c names.c outer.c quotearg.c recode.c request.c strip-pool.c task.c xmalloc.c $(C_STEPS)
+ 
+-librecode_la_LDFLAGS = -version-info 0:0:0
++librecode_la_LDFLAGS = -version-info 3:6:0
+ 
+ INCLUDES = -I.. -I$(srcdir) -I$(top_srcdir)/lib -I$(top_srcdir)/libiconv
+ DEFS = -DLIBDIR=\"$(libdir)\" @DEFS@
+@@ -153,7 +153,7 @@
+ 
+ CPPFLAGS = @CPPFLAGS@
+ LDFLAGS = @LDFLAGS@
+-LIBS = @LIBS@
++LIBS = @LIBS@ ../lib/libreco.a
+ ANSI2KNR = @ANSI2KNR@
+ librecode_la_LIBADD = 
+ librecode_la_OBJECTS =  argmatch$U.lo charname$U.lo combine$U.lo \

>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200303101116.h2ABGXMW055183>