! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
fix objformat definition for FreeBSD
Status:
RESOLVED: FIXED
Product:
Xfce4-dev-tools
Component:
General

Comments

Description Oliver Lehmann 2007-02-03 18:46:49 CET
All the configure scripts in xfce are setting the default objformat to aout if the objformat binary is missing.
The objformat binary was added in FreeBSD 3 days to ease the transition from aout to elf. In FreeBSD 7 the binary got finally removed. The aout support was removed in FreeBSD 4 so since then the objformat binary was just a "left over".

I suggest to remove the whole objformat detection stuff from aclocal.m4 because FreeBSD switched to elf in 2000 with FreeBSD 3 (EOL end of 2000) and had no way to move back to aout with FreeBSD 4 (started in 2000).

I suggest the following patch to fix the object format stuff in FreeBSD 7 and higher.

--- aclocal.m4.orig     Sat Jan 20 19:21:04 2007
+++ aclocal.m4  Sat Feb  3 19:46:08 2007
@@ -1290,33 +1290,12 @@
   ;;
 
 freebsd*)
-  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
-  version_type=freebsd-$objformat
-  case $version_type in
-    freebsd-elf*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-      need_version=no
-      need_lib_prefix=no
-      ;;
-    freebsd-*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
-      need_version=yes
-      ;;
-  esac
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  need_version=no
+  need_lib_prefix=no
   shlibpath_var=LD_LIBRARY_PATH
-  case $host_os in
-  freebsd2*)
-    shlibpath_overrides_runpath=yes
-    ;;
-  freebsd3.[01]* | freebsdelf3.[01]*)
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
-    ;;
-  *) # from 3.2 on
-    shlibpath_overrides_runpath=no
-    hardcode_into_libs=yes
-    ;;
-  esac
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
   ;;
 
 gnu*)
Comment 1 Oliver Lehmann 2007-02-03 18:47:35 CET
Created attachment 979 
aclocal patch
Comment 2 Benedikt Meurer editbugs 2007-02-04 11:46:16 CET
aclocal.m4 is generated by autoconf, it's not even in the repository.
Comment 3 Oliver Lehmann 2007-02-04 12:06:05 CET
Ok, but this leads to a misusage of the includes libtool.
The cause might be an outdated libtool.m4 which leads to this kind of definition (I'm cleanly no autotools magician, so correct me if I'm wrong).

An actual version of libtool.m4 says:

freebsd* | dragonfly*)
  # DragonFly does not have aout.  When/if they implement a new
  # versioning mechanism, adjust this.
  if test -x /usr/bin/objformat; then
    objformat=`/usr/bin/objformat`
  else
    case $host_os in 
    freebsd[[123]]*) objformat=aout ;;
    *) objformat=elf ;;
    esac
  fi
  version_type=freebsd-$objformat

So I guess the scripts just needed to be generated with a more modern libtool installed?
Comment 4 Benedikt Meurer editbugs 2007-02-04 12:12:20 CET
Indeed, the libtool version I used for the release tarballs was rather outdated (1.5.6). I've updated to 1.5.22, so the next release is going to work out-of-the-box. ;-)

Bug #2859

Reported by:
Oliver Lehmann
Reported on: 2007-02-03
Last modified on: 2009-07-15

People

Assignee:
Xfce Bug Triage
CC List:
0 users

Version

Attachments

aclocal patch (1.17 KB, application/octet-stream)
2007-02-03 18:47 CET , Oliver Lehmann
no flags

Additional information