Hello finkers,
Well thanks to suggestions from Martin and Mathias, I've refined my pdcurses-2.6-1.info file, so it looks like the following:
Package: pdcurses
Version: 2.6
Revision: 1
Maintainer: Eric Oberle <[EMAIL PROTECTED]>
GCC: 3.1
Source: mirror:sourceforge:/pdcurses/PDCurses-2.6.tar.gz
Source-MD5: a376c91c7fdfa0215f4c22024ca325f1
Compilescript: ./configure %c
make all
DocFiles: readme.* README TODO
Description: pdcurses, an XCurses library
DescDetail: <<
PDCurses is an implementation of the curses library for X11. It provides
the ability for existing text-mode curses programs to be re-built as
native X11 applications with very little modification.
PDCurses for X11 is also known as XCurses.
For more information on PDCurses, visit http://www.lightlink.com/hessling/
<<
DescPackaging:
License: GPL
Homepage: http://pdcurses.sourceforge.net
I think this passes muster a bit better! Unfortunately, though, I'm still stumped by the underlying multiple symbol definition error I receive when I try to do a fink install pdcurses. Here's the error message:
<snip>
gcc -dynamiclib -install_name=libXCurses.dylib -o libXCurses.dylib addch.sho addchstr.sho addstr.sho attr.sho beep.sho bkgd.sho border.sho clear.sho color.sho delch.sho deleteln.sho getch.sho getstr.sho getyx.sho inch.sho inchstr.sho initscr.sho inopts.sho insch.sho insstr.sho instr.sho kernel.sho mouse.sho move.sho outopts.sho overlay.sho pad.sho printw.sho refresh.sho scanw.sho scroll.sho slk.sho termattr.sho terminfo.sho touch.sho util.sho window.sho pdcclip.sho pdcdebug.sho pdcdisp.sho pdcgetsc.sho pdckbd.sho pdcprint.sho pdcscrn.sho pdcsetsc.sho pdcutil.sho pdcwin.sho pdcx11.sho x11curses.sho x11common.sho x11.sho sb.sho ScrollBox.sho
ld: multiple definitions of symbol _Mouse_status
initscr.sho definition of _Mouse_status in section (__DATA,__common)
pdcx11.sho definition of _Mouse_status in section (__DATA,__common)
ld: multiple definitions of symbol _app_data
pdcx11.sho definition of _app_data in section (__DATA,__common)
x11curses.sho definition of _app_data in section (__DATA,__common)
x11common.sho definition of _app_data in section (__DATA,__common)
x11.sho definition of _app_data in section (__DATA,__common)
/usr/bin/libtool: internal link edit command failed
make[1]: *** [libXCurses.dylib] Error 1
make: *** [all] Error 2
### execution of make failed, exit code 2
Failed: compiling pdcurses-2.6-1 failed
<snip-snip>
Can anyone give me some hints on where to look? I've
tweaked all the ld flags that I can, but that seems to not do any
good. I have to admit that usually I can do ok tracking down
compile errors, but I get very confused by linking errors because I
personally have never written a library and I don't understand the mac
os x linker.
My general suspicion is that the problem has to do with how to
coerce global variables as globals, and when they need to be allocated
in a library that contains no main{}. I was able to get rid of one of
the errors listed above (the double definition of Mouse_status) by
inserting an 'extern' before line 857 of its
declaration in /x11/pdcx11.c. But I just don't seem
to understand how to clear up the problem with the multiple
definitions of app_data in the system.
I suspect that this is a common issue for Mac Os X, and that it
comes about because its compiler is super-strict with the declaration
of global variables. I at any rate did a search on google
for this kind of error, and it seems to be a very common--at least for
Mac os x users. I don't know if this means that there is a
fairly straightforward problem that one can solve through
compatibility switches and such, or whether it is one of those link
errors that just points back to some sort of more basic problem in the
compile.
If I'm right on that (I certainly could be wrong!), at least from
the google search, the 'ld: multiple definitions of symbol
...." error would probably rate a FAQ entry, even if the answer
is something like keep looking elsewhere for another error (linking is
just the symptom), or, perhaps a brief explanation of why building a
Mach-o exec file seems to be so different than linking objects is on
linux. I've read up on this as much as I could, but it is
obviously one of the areas that requires a thorough knowledge of C++'s
methods for building libraries (and its ability to circumvent explicit
declaration) plus unix's linking procedure, plus its quirks on mac os
x. Obviously, though, I'm stumbling around a bit in the
dark here, and am having trouble even articulating what I am ignorant
about. Is there anyone out there who can point me around the
next corner?
(Its pretty easy to reproduce the build errors I'm talking
about with the .info file enclosed above.....and I have a sense that
the problem probably isn't too hard.....but I'm stumped---
help!?)
and thanks again,
Eric
p.s. I apologize if I'm bugging the wrong list here....please
staighten me out if I should go elsewhere :-)
--
