Skip to content

Commit

Permalink
Build fixes for Perl/Ubuntu
Browse files Browse the repository at this point in the history
Ubuntu has modified their linker such that -lfoo no longer necessarily creates
a DT_NEEDED entry for libfoo.so. This breaks Perl modules, unless
--no-as-needed is included to force an entry.

Ref: https://wiki.ubuntu.com/NattyNarwhal/ToolchainTransition

Also remove Makefile.old, build for Perl in Travis.
  • Loading branch information
eam committed Jul 16, 2014
1 parent e678912 commit f01a070
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 123 deletions.
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ perl:
install:
- sudo apt-get update -qq
- sudo apt-get install -y openssl libcppunit-dev libreadline6 libreadline6-dev valgrind realpath libmodule-install-perl
script: "make && make test-fast"
script: "make && make test-fast && make perl"
notifications:
irc:
- "irc.freenode.net#mdbm"
4 changes: 2 additions & 2 deletions src/perl/Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ EOT
}

my $ccflags = '$(COMP_CFLAGS_RELAXED)';
my $ldflags = '-shared -L/usr/local/lib64 -Wl,-rpath,$(LIBDIR)';
my $ldflags = ' -Wl,--no-as-needed -shared -L/usr/local/lib64 -Wl,-rpath,$(LIBDIR)';
my $libs = "-L\$(LIBDIR) -L../lib/\$(OBJDIR) -lmdbm -lstdc++ ";

#my $makefileSuffix = ($ObjDir eq '.' ? '' : '.' . $ObjDir);
Expand Down Expand Up @@ -83,7 +83,7 @@ WriteMakefile(
AUTHOR => 'Yahoo! MDBM developers') : ()),
CCFLAGS => $ccflags,
#LIBS => ":nosearch $libs",
LDDLFLAGS => "$libs $ldflags",
LDDLFLAGS => " $ldflags $libs ",
DEFINE => '', # e.g., '-DHAVE_SOMETHING'
INC => '-I$(INCDIR) -I../../include',
'XSOPT' => '-C++',
Expand Down
120 changes: 0 additions & 120 deletions src/perl/Makefile.old

This file was deleted.

0 comments on commit f01a070

Please sign in to comment.