Loading ...
Sorry, an error occurred while loading the content.

libtool problems

Expand Messages
  • Josh Parsons
    I ve realised that a number of unslung package binaries contain hardcoded paths to the build-time staging area. Though this is in most cases harmless, it
    Message 1 of 1 , Jun 2 12:26 PM
    • 0 Attachment
      I've realised that a number of unslung package binaries contain
      hardcoded paths to the build-time staging area. Though this is in most
      cases harmless, it would be best to remove the problem...

      It seems that this is another effect of the longstanding problem with
      libtool-based sources packages having strange, hardcoded views about
      where system libraries are to be found at run-time, which resulted in
      users with .la files present in their /lib or /usr/lib directories being
      unable to build unslung packages.

      Though a few packages have taken their own solutions to the problem, I
      think it would be good to have a consistent approach. Accordingly, I've
      defined PATCH_LIBTOOL in the root makefile to invoke sed -i with an
      expression that will modify a libtool script to behave correctly in the
      unslung build environment.

      The way to use it is, just after your libtool-based package has run
      configure, run this: "$(PATCH_LIBTOOL) <path_to_libtool_script>"

      Note that this is only necessary for packages that use gnu libtool.
      Comments would be welcome.

      An example can be found in apr.mk:

      $(APR_BUILD_DIR)/.configured: $(DL_DIR)/$(APR_SOURCE) \
      $(APR_PATCHES)
      rm -rf $(BUILD_DIR)/$(APR_DIR) $(APR_BUILD_DIR)
      $(APR_UNZIP) $(DL_DIR)/$(APR_SOURCE) | tar -C $(BUILD_DIR) -xvf -
      mv $(BUILD_DIR)/$(APR_DIR) $(APR_BUILD_DIR)
      (cd $(APR_BUILD_DIR); \
      $(TARGET_CONFIGURE_OPTS) \
      CPPFLAGS="$(STAGING_CPPFLAGS) $(APR_CPPFLAGS)" \
      LDFLAGS="$(STAGING_LDFLAGS) $(APR_LDFLAGS)" \
      ac_cv_func_setpgrp_void=yes \
      ac_cv_sizeof_size_t=4 \
      ac_cv_sizeof_ssize_t=4 \
      ac_cv_sizeof_off_t=4 \
      ac_cv_sizeof_pid_t=4 \
      apr_cv_process_shared_works=no \
      ./configure \
      --build=$(GNU_HOST_NAME) \
      --host=$(GNU_TARGET_NAME) \
      --target=$(GNU_TARGET_NAME) \
      --prefix=$(STAGING_DIR)/opt \
      --libdir=/opt/lib \
      --disable-static \
      --enable-layout=GNU \
      )
      $(PATCH_LIBTOOL) $(APR_BUILD_DIR)/libtool
      touch $(APR_BUILD_DIR)/.configured

      --
      Josh Parsons
      Philosophy Department
      1238 Social Sciences and Humanities Bldg.
      University of California
      Davis, CA 95616-8673
      USA

      Please avoid sending me Word or PowerPoint attachments.
      See http://www.gnu.org/philosophy/no-word-attachments.html
    Your message has been successfully submitted and would be delivered to recipients shortly.