[erlang-questions] OTP13B03 failed to make parallel on OS X 10.6 in 64-bit: ld: duplicate symbol _debug in debuglog.o and esock.o
Mikael Pettersson
mikpe@REDACTED
Thu Dec 17 11:39:54 CET 2009
Illo de' Illis writes:
> On Dec 17, 2009, at 5:12 AM, Ceriel Jacobs wrote:
> > On 16 dec 2009, at 22:05 Illo de Illis wrote:
> >> Try and edit files lib/ssl/c_src/debuglog.h and lib/ssl/esock_ssl.h and prepend an 'extern' to every definition in order to change them to declarations.
> > That doesn't sound like a good idea to me:
> > 1. I am not a C programmer, I don't know what a definition in C is; in other words I don't know what I am editing in such a header file
> > 2. With me editing in my local files, will bring back these errors every new release
>
> Looks like erlang developers are in the process of cleaning up the duplicate symbols for the next release, so I guess you won't have to do it again in R13B04.
> I've attached a patch file that does the job.
>
> Ciao,
> Illo.
>
> diff --git erts/emulator/beam/global.h erts/emulator/beam/global.h
> index 62a788c..87e83e3 100644
> --- erts/emulator/beam/global.h
> +++ erts/emulator/beam/global.h
> @@ -1658,7 +1658,7 @@ void erts_bif_trace_init(void);
> /*
> ** Call_trace uses this API for the parameter matching functions
> */
> - struct erl_heap_fragment* saved_program_buf;
> +/* struct erl_heap_fragment* saved_program_buf; */
>
> #define MatchSetRef(MPSP) \
> do { \
> diff --git lib/erl_interface/src/misc/ei_internal.h lib/erl_interface/src/misc/ei_internal.h
> index 9f51d1f..f7805ef 100644
> --- lib/erl_interface/src/misc/ei_internal.h
> +++ lib/erl_interface/src/misc/ei_internal.h
> @@ -149,7 +149,7 @@
> {if (ei_tracelevel >= 5) ei_trace_printf(NAME,1,FORMAT,ARG1,ARG2,ARG3,ARG4, \
> ARG5,ARG6,ARG7);}
>
> -int ei_tracelevel;
> +extern int ei_tracelevel;
extern in variable declarations in .h files is correct
(and not having the extern there is almost always incorrect).
> -void open_ssllog(char *path);
> -void close_ssllog(void);
> -FILE *openlog(char *);
> -void closelog(FILE *);
> -int __debugprintf(const char *, ...);
> -int __debugprintclistf(const char *, ...);
> -int __debuglogf(const char *, ...);
> +extern void open_ssllog(char *path);
> +extern void close_ssllog(void);
> +extern FILE *openlog(char *);
> +extern void closelog(FILE *);
> +extern int __debugprintf(const char *, ...);
> +extern int __debugprintclistf(const char *, ...);
> +extern int __debuglogf(const char *, ...);
extern in function declarations in .h files is not needed
and just plain redundant.
More information about the erlang-questions
mailing list