Subject: | Doesn't build out of the box on Mac OS X 10.10 |
Date: | Sat, 27 Jun 2015 20:38:44 -0600 |
To: | bug-Hobocamp [...] rt.cpan.org |
From: | Warren Young <wyoung [...] tangentsoft.com> |
I ran into several issues trying to get this to build on OS X 10.10:
- The first was the missing ExtUtils::CChecker dependency, already reported.
- Then “perl Makefile.PL” failed because it couldn’t find dialog.h, because it’s in /usr/local/include on my machine, which isn’t in the default include path on OS X. I don’t know much about makemaker, but there must be an autoconf-like way to seek out needed files.
I had to say “CFLAGS=-I/usr/local/include perl Makefile.PL” to get the Makefile to build.
That was insufficient since the CFLAGS environment variable wasn’t copied into the resulting Makefile, so I had to hack it in by hand.
- Then clang complained:
Dialog.xs:17:1: error: static declaration of 'dlg_dummy_menutext' follows
non-static declaration
It gave the same complaint about dlg_renamed_menutext.
I removed the “static”, which allowed it to compile, but then it failed to link because that comes from libdialog. I know the Linux linker allows you to override library functions like this, but apparently not the OS X one. What’s wrong with using the stock version?
I nuked both redefinitions, which allowed it to link.
- Then it failed to link again because /usr/local/lib isn’t in the stock library include path. Hand-hacking that into Makefile allowed it to finally link.
- Now I’m stuck at “make test”, since 100% of the tests failed. I managed to distill the problem to this simple test case:
$ perl -MHobocamp::Dialog
Can't load '/Library/Perl/5.18/darwin-thread-multi-2level/auto/Hobocamp/Dialog/Dialog.bundle' for module Hobocamp::Dialog: dlopen(/Library/Perl/5.18/darwin-thread-multi-2level/auto/Hobocamp/Dialog/Dialog.bundle, 1): Symbol not found: _COLOR_PAIRS
Referenced from: /Library/Perl/5.18/darwin-thread-multi-2level/auto/Hobocamp/Dialog/Dialog.bundle
Expected in: flat namespace
in /Library/Perl/5.18/darwin-thread-multi-2level/auto/Hobocamp/Dialog/Dialog.bundle at /System/Library/Perl/5.18/XSLoader.pm line 71.
at /Library/Perl/5.18/darwin-thread-multi-2level/Hobocamp/Dialog.pm line 81.
Compilation failed in require.
BEGIN failed--compilation aborted.
I have no idea what this COLOR_PAIRS symbol is, or why it’s missing.
Perhaps it’s something from ncurses? I did get a “mostly harmless” warning during “perl Makefile.PL” about a missing -lncursesw.