Building file 4.26: duplicate symbol?

Bryan Blackburn 0x62_0x6c_0x62 at pobox.com
Fri Sep 12 13:29:48 PDT 2008


On Fri, Sep 12, 2008 at 09:40:05AM -0400, Jay Levitt said:
[...]
> 
> When building file 4.26, on OS X 10.5.4 Leopard, I get a duplicate symbol 
> error from ld.  I don't know enough about object modules to debug unaided, 
> but if someone can let me know how to troubleshoot this, I'm happy to dig 
> further.
> 

Looks like the issue is in src/file.h, specifically it defines struct
level_info, and creates a pointer to that struct '*li'.  Since file.h is
included in multiple files, you get the dup symbol error.  Removing the *li
gets it to build fine here; patch that does so is attached.  Simply
removing it seems okay since the variable isn't actually used anywhere.

Bryan


[...]
-------------- next part --------------
--- src/file.h.orig	2008-07-26 09:03:55.000000000 -0600
+++ src/file.h	2008-09-12 14:21:26.000000000 -0600
@@ -302,7 +302,7 @@
 	int last_match;
 	int last_cond;	/* used for error checking by parse() */
 #endif
-} *li;
+};
 struct magic_set {
 	struct mlist *mlist;
 	struct cont {


More information about the macports-dev mailing list