Adriaan van Os wrote:
While trying to build a Mach-O dynamically linked shared library with GPC and LD, I get the following error:
ld: common symbols not allowed with MH_DYLIB output format with the -multi_module option /Developer/Pascal/gpc321d11/lib/gcc-lib/powerpc-apple-darwin6.3/3.2.1// libgpc.a(filename.o) definition of common ___set_result_0__ (size 32) /Developer/Pascal/gpc321d11/lib/gcc-lib/powerpc-apple-darwin6.3/3.2.1// libgpc.a(filename.o) definition of common ___set_result_1__ (size 32) /Developer/Pascal/gpc321d11/lib/gcc-lib/powerpc-apple-darwin6.3/3.2.1// libgpc.a(filename.o) definition of common ___set_result_2__ (size 32) /Developer/Pascal/gpc321d11/lib/gcc-lib/powerpc-apple-darwin6.3/3.2.1// libgpc.a(filename.o) definition of common ___set_result_3__ (size 32)
My questions are:
- Is there something special about symbols for sets ?
The special thing is that they're temporary variables that may occur in the values of constants (e.g. `const Foo = [a, b] + [c .. d]'). It would be nicer to avoid it. For `+', merging the set constructors would be easy, but for the other operators, it gets hairier ...
- Would it help to rebuild libgpc.a with the --no-common flag ?
Perhaps, but there may be other conflicts then.
- Any other ideas or suggestions ?
As a work-around try replacing the set operations in EnvVarChars and FileNameSpecialChars in p/rts/filename.pas and p/rts/gpc.pas by their values.
I hope I can fix this problem in the next release.
Frank