php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58367 Make gnupg.so fails duplicate symbol _gnupg_class_entry
Submitted: 2008-10-06 00:18 UTC Modified: -
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: rivetcamille at gmail dot com Assigned:
Status: Open Package: gnupg (PECL)
PHP Version: 5.2.5 OS: Mac OS 10.5.5
Private report: No CVE-ID:
Have you experienced this issue?
Rate the importance of this bug to you:

 [2008-10-06 00:18 UTC] rivetcamille at gmail dot com
Description:
------------
Hello,
Unfortunately, i can't compile the gnupg extension ... 

Please look at the reproduce code.

I can phpize the .tar and execute ./configure without any 
problem.

Bug happen when i execute the make command.

I've alreay tried to compile gnupg with the MAMP packaged php 
and with a fresh installed php using macport.

Reproduce code:
---------------
 gcc -I. -I/Users/camille/Downloads/gnupg-1.3.1/gnupg-1.3.1 -DPHP_ATOM_INC -I/Users/camille/Downloads/gnupg-1.3.1/gnupg-1.3.1/include -I/Users/camille/Downloads/gnupg-1.3.1/gnupg-1.3.1/main -I/Users/camille/Downloads/gnupg-1.3.1/gnupg-1.3.1 -I/opt/local/include/php -I/opt/local/include/php/main -I/opt/local/include/php/TSRM -I/opt/local/include/php/Zend -I/opt/local/include/php/ext -I/opt/local/include/php/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /Users/camille/Downloads/gnupg-1.3.1/gnupg-1.3.1/gnupg_keylistiterator.c  -fno-common -DPIC -o .libs/gnupg_keylistiterator.o
/bin/sh /Users/camille/Downloads/gnupg-1.3.1/gnupg-1.3.1/libtool --mode=link gcc -DPHP_ATOM_INC -I/Users/camille/Downloads/gnupg-1.3.1/gnupg-1.3.1/include -I/Users/camille/Downloads/gnupg-1.3.1/gnupg-1.3.1/main -I/Users/camille/Downloads/gnupg-1.3.1/gnupg-1.3.1 -I/opt/local/include/php -I/opt/local/include/php/main -I/opt/local/include/php/TSRM -I/opt/local/include/php/Zend -I/opt/local/include/php/ext -I/opt/local/include/php/ext/date/lib -I/usr/local/include  -DHAVE_CONFIG_H  -g -O2   -o gnupg.la -export-dynamic -avoid-version -prefer-pic -module -rpath /Users/camille/Downloads/gnupg-1.3.1/gnupg-1.3.1/modules  gnupg.lo gnupg_keylistiterator.lo -Wl,-rpath,/usr/local/include/lib -L/usr/local/include/lib -lgpgme
gcc ${wl}-flat_namespace ${wl}-undefined ${wl}suppress -o .libs/gnupg.so -bundle  .libs/gnupg.o .libs/gnupg_keylistiterator.o  -L/usr/local/include/lib /usr/local/lib/libgpgme.dylib -L/usr/local/lib /usr/local/lib/libgpg-error.dylib -Wl,-rpath -Wl,/usr/local/include/lib
ld: duplicate symbol _gnupg_class_entry in .libs/gnupg_keylistiterator.o and .libs/gnupg.o

collect2: ld returned 1 exit status
make: *** [gnupg.la] Error 1




Patches

php_gnupg.h_patch (last revision 2014-02-18 18:44 UTC) by bradsacks99 at gmail dot com)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-01-16 00:39 UTC] hiroshi at asial dot co dot jp
Hello, I have same problem.
I made a patch that solved a problem. It seems to work just fine for me.

patch:
------
diff -u gnupg-1.3.1.orig/php_gnupg.h gnupg-1.3.1/php_gnupg.h
--- gnupg-1.3.1.orig/php_gnupg.h        2007-05-04 22:23:41.000000000 +0900
+++ gnupg-1.3.1/php_gnupg.h     2009-01-16 12:10:03.000000000 +0900
@@ -43,7 +43,11 @@
     HashTable *decryptkeys;
 } gnupg_object;
 
+#ifdef __APPLE__
+static zend_class_entry *gnupg_class_entry;
+#else
 zend_class_entry *gnupg_class_entry;
+#endif
 
 PHP_MINIT_FUNCTION(gnupg);
 PHP_MSHUTDOWN_FUNCTION(gnupg);
diff -u gnupg-1.3.1.orig/php_gnupg_keylistiterator.h gnupg-1.3.1/php_gnupg_keylistiterator.h
--- gnupg-1.3.1.orig/php_gnupg_keylistiterator.h        2007-05-04 22:23:41.000000000 +0900
+++ gnupg-1.3.1/php_gnupg_keylistiterator.h     2009-01-16 12:10:03.000000000 +0900
@@ -40,7 +40,11 @@
     zval pattern;
 } gnupg_keylistiterator_object;
 
+#ifdef __APPLE__
+static zend_class_entry *gnupg_keylistiterator_class_entry;
+#else
 zend_class_entry *gnupg_keylistiterator_class_entry;
+#endif
 
 PHP_METHOD(gnupg_keylistiterator, __construct);
 PHP_METHOD(gnupg_keylistiterator, current);
Common subdirectories: gnupg-1.3.1.orig/tests and gnupg-1.3.1/tests
 [2009-04-17 20:41 UTC] mike at mikeyp dot net
Attached patch works for me on Mac OS 10.5.6 with PHP 5.2.9 
and gpgme-1.1.8.
 [2014-02-18 18:44 UTC] bradsacks99 at gmail dot com
Patch worked for me too
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Fri Apr 25 09:01:45 2014 UTC