Permalink
Browse files

Use LSB libraries to try to reduce c++ linking problems.

  • Loading branch information...
1 parent 0a0001d commit 96c0cbd131e45af06bf15a02c5b9c681d3553fe7 @rfk committed Mar 7, 2012
Showing with 44 additions and 10 deletions.
  1. +6 −8 myppy/envs/linux.py
  2. +2 −2 myppy/recipes/base.py
  3. +36 −0 myppy/recipes/linux.py
View
14 myppy/envs/linux.py
@@ -25,7 +25,7 @@ def __init__(self,rootdir):
self._add_env_path("PKG_CONFIG_PATH",os.path.join(self.PREFIX,
"lib/pkgconfig"))
- _RECIPES_WITH_APGCC_PROBLEMS = ("apbuild_base","apbuild",
+ _RECIPES_WITH_APGCC_PROBLEMS = ("apbuild_base","apbuild", "bin_lsbsdk",
"lib_apiextractor",)
def record_files(self,recipe,files):
for fpath in files:
@@ -52,22 +52,20 @@ def _strip(self,fpath):
def _check_glibc_symbols(self,fpath):
print "VERIFYING GLIBC SYMBOLS", fpath
+ errors = []
for ln in self.bt("objdump","-T",fpath).split("\n"):
for field in ln.split():
if field.startswith("GLIBC_"):
ver = field.split("_",1)[1].split(".")
ver = map(int,ver)
if ver >= [2,4,]:
- err = "new glibc symbols in " + fpath
- err += "\n" + ln.strip()
- assert False, err
+ errors.append(ln.strip())
elif field.startswith("GLIBCXX_"):
ver = field.split("_",1)[1].split(".")
ver = map(int,ver)
- if ver > [3,4,]:
- err = "new glibcxx symbols in " + fpath
- err += "\n" + ln.strip()
- assert False, err
+ if ver > [3,4,7]:
+ errors.append(ln.strip())
+ assert not errors, "\n".join(errors)
def _adjust_rpath(self,fpath):
# patchelf might not be installed if we're just initialising the env.
View
4 myppy/recipes/base.py
@@ -391,7 +391,7 @@ class lib_readline(Recipe):
class lib_zlib(Recipe):
SOURCE_URL = "http://zlib.net/zlib-1.2.6.tar.gz"
SOURCE_MD5 = "618e944d7c7cd6521551e30b32322f4a"
- CONFIGURE_ARGS = ("--static", "--solo",)
+ CONFIGURE_ARGS = ("--static",)
CONFIGURE_VARS = None
def _configure(self):
super(lib_zlib,self)._configure()
@@ -403,7 +403,7 @@ def dont_copy_dylib(lines):
class lib_png(Recipe):
- SOURCE_URL = "http://downloads.sourceforge.net/project/libpng/libpng15/1.5.1/libpng-1.5.1.tar.gz"
+ SOURCE_URL = "http://downloads.sourceforge.net/project/libpng/libpng15/1.5.9/libpng-1.5.9.tar.gz"
class lib_jpeg(Recipe):
View
36 myppy/recipes/linux.py
@@ -324,6 +324,36 @@ class lib_wxwidgets_base(base.lib_wxwidgets_base,Recipe):
CONFIGURE_ARGS.extend(base.lib_wxwidgets_base.CONFIGURE_ARGS)
+class bin_rpm2cpio(Recipe):
+ SOURCE_URL = "http://www.iagora.com/~espel/rpm2cpio"
+ def build(self):
+ pass
+ def install(self):
+ src = self.target.fetch(self.SOURCE_URL)
+ dst = os.path.join(self.INSTALL_PREFIX, "bin", "rpm2cpio")
+ os.rename(src,dst)
+ mod = os.stat(dst).st_mode
+ mod |= stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH
+ os.chmod(dst,mod)
+
+
+class bin_lsbsdk(Recipe):
+ DEPENDENCIES = ["bin_rpm2cpio"]
+ SOURCE_URL = "http://ftp.linuxfoundation.org/pub/lsb/bundles/released-4.1.0/sdk/lsb-sdk-4.1.2-1.ia32.tar.gz"
+ def build(self):
+ pass
+ def install(self):
+ updir = self._unpack()
+ for nm in os.listdir(updir):
+ if nm.endswith(".rpm"):
+ fpath = os.path.join(updir, nm)
+ with open(fpath+".cpio", "w+") as stdout:
+ self.target.do("rpm2cpio", fpath, stdout=stdout)
+ stdout.seek(0)
+ with cd(self.INSTALL_PREFIX):
+ self.target.do("cpio", "-duvi", stdin=stdout)
+
+
class lib_sparsehash(Recipe):
"""Google sparehash, using old C++ hash function APIs.
@@ -355,6 +385,12 @@ class lib_shiboken(base.lib_shiboken,CMakeRecipe):
# in symbols from C++ TR1 hashtable spec.
DEPENDENCIES = ["lib_sparsehash"]
@property
+ def LDFLAGS(self):
+ flags = super(lib_shiboken,self).LDFLAGS
+ lsblibdir = os.path.join(self.PREFIX,"opt","lsb","lib")
+ flags += " -L%s" % (lsblibdir,)
+ return flags
+ @property
def CXXFLAGS(self):
flags = super(lib_shiboken,self).CXXFLAGS
flags += " -I" + os.path.join(self.PREFIX,"include")

0 comments on commit 96c0cbd

Please sign in to comment.