FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian dpkg

 
 
LinkBack Thread Tools
 
Old 09-21-2011, 05:12 AM
 
Default dpkg build under Mac OS X failed

(I wrote Raphael earlier and am writing again after taking what he said
into account.)

I tried to build dpkg from source under Mac OS X 10.6.8, and succeeded
only by

altering dpkg-linker.m4 to remove the -O1 flag the Apple linker ld didn't
understand
getting newer versions of autotools
using the -i flag for autoreconf

It would have been very helpful if there had been a README or INSTALL with
instructions,
particularly the prerequisites and procedures for building dpkg. Surely
a package manager should not expect the presence of a package manager to
figure out dependencies. Also I didn't know which branch of the git
repository I wanted (but I used master, thinking that's what Raphael
recommended).

*****

details of what I did:

git clone git://git.debian.org/git/dpkg/dpkg.git
autoreconf - which gave a number of messages about missing AM_* macros
and problems in the dpkg m4 scripts about DPKG_* being required but not
defun'd . This was from autoconf 2.6.1, automake 1.10, m4 1.4.6, libtool
Apple Computer, Inc. version cctools-795, which were what was on the
system, possibly from installing Xcode 3.2.6.

I had later versions of autotools (autoconf 2.68, automake 1.11, m4
1.4.16, libtool 2.4) on the system though not in the path at the time of
running autoreconf above. When I included them in the path, which also
included perl 5.14.1 (the default on the mac is 5.10.0), having newly
re-config'd, made, and installed them in the presence of that perl (which
was not built with threads enabled; something about which they had
complained before they were rebuilt), and also in the presence of other
newer software versions too numerous to describe now, an autoreconf for
dpkg complained only about some missing files in build-aux.

Then, using the -i flag for autoreconf, there were no errors. Then
(unsure of what to do) I ran autoheader and automake, ./configure
--prefix=/usr/local/unix all of which went Ok, and make, which went Ok
until it came to linking I think: the output showed CC build.o, extract.o,
info.o, main.o, then CCLD dpkg-deb resulted in ld: unknown option: -O1.

The version of ld is @(#)PROGRAM:ld PROJECT:ld64-97.17
llvm version 2.9svn, from Apple Clang 1.7 (build 77)

Perhaps wrongly, I wasn't motivated to find a newer version of ld.
Already I'd had a problem when making new binutils that the new ar and
ranlib apparently couldn't read the magic numbers right, so that I had to
use the original apple versions (or get into their source code).

So, in m4/dpkg-linker.m4 I removed the -O1 flag from the default LDFLAGS,
re-ran autoreconf etc., and everything build and installed Ok. dpkg
--help worked, but at this point I had no further need for dpkg, since I'd
already dealt manually with the dependencies for building a number of
packages from source.

make check doesn't get past CCLD t-test, which has an undefined symbol
_libintl_gettext. There
had been no gettext on the system, but I build that, and the necessary
symbol seems to be defined
(according to nm) in the libintl.a and libintl.dylib in a directory I
tried to tell the linker about via LDFLAGS, but apparently I haven't
discovered the right way to let the dpkg build system know about it. My
time for this has run out now.

Thank you all for your work on dpkg.


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 473268460b4ac021315e1a7e35ef264d.squirrel@webmail. zulazon.com">http://lists.debian.org/473268460b4ac021315e1a7e35ef264d.squirrel@webmail. zulazon.com
 
Old 09-21-2011, 07:13 PM
Guillem Jover
 
Default dpkg build under Mac OS X failed

Hi!

On Tue, 2011-09-20 at 22:12:36 -0700, stuart@zulazon.com wrote:
> I tried to build dpkg from source under Mac OS X 10.6.8, and succeeded
> only by
>
> altering dpkg-linker.m4 to remove the -O1 flag the Apple linker ld didn't
> understand getting newer versions of autotools using the -i flag for
> autoreconf

For the ld issue, you can use --disable-linker-optimisations, but this
has already bitten some people, and using those flags by default is
clearly not portable, so I'll be disabling them on the next release
(1.16.2).

> It would have been very helpful if there had been a README or INSTALL with
> instructions, particularly the prerequisites and procedures for building
> dpkg.

I had at some point a slightly improved README with more documentation,
but seem to have lost it. I'm attaching a new more complete one which I
hope would have covered your needs? The only slight drawback is that it
duplicates some of the information already contained in the Debian
source package metadata, which could become out of date, but it should
be of help for people building from git.

The INSTALL file is present but only after having prepared the release
for distribution, which is not the case when getting the source from
git.

> So, in m4/dpkg-linker.m4 I removed the -O1 flag from the default LDFLAGS,
> re-ran autoreconf etc., and everything build and installed Ok. dpkg
> --help worked, but at this point I had no further need for dpkg, since I'd
> already dealt manually with the dependencies for building a number of
> packages from source.

Well that's always going to be true when bootstrapping a package
manager. Also I'm not sure it makes much sense to use dpkg on a
foreign system, when most (if not all) of the software installed is
not managed by dpkg, which kind of renders it purposeless.

If you are still interested in just having dpkg around in your
Mac OS X, then using the MacPorts dpkg port might be easier?

> make check doesn't get past CCLD t-test, which has an undefined symbol
> _libintl_gettext. There had been no gettext on the system, but I
> build that, and the necessary symbol seems to be defined (according to
> nm) in the libintl.a and libintl.dylib in a directory I tried to tell
> the linker about via LDFLAGS, but apparently I haven't discovered the
> right way to let the dpkg build system know about it. My time for
> this has run out now.

gettext should be required when preparing the tar distribution source
tree, and I'm surprised autoreconf didn't complain about missing
AM_GNU_GETTEXT and AM_GNU_GETTEXT_VERSION macros?

In any case if you get that error even when disabling NLS support, or
when building dpkg from a tarball release but w/o gettext installed
I'd be interested in the build logs, because that'd be a problem in
dpkg's build system.

thanks,
guillem
dpkg - Debian's package maintenance system

The primary interface for the dpkg suite is the ‘dselect’ program;
a more low-level and less user-friendly interface is available in
the form of the ‘dpkg’ command.


Releases
--------

The current legacy, stable and development releases can be found at:

<http://ftp.debian.org/debian/pool/main/d/dpkg/>

For older releases check:

<http://snapshot.debian.org/package/dpkg/>


Mailing List
------------

The subscription interface and web archives can be found at:

<http://lists.debian.org/debian-dpkg/>

The mailing list address is:

debian-dpkg@lists.debian.org


Source Repository
-----------------

<http://anonscm.debian.org/gitweb/?p=dpkg/dpkg.git>
<git://anonscm.debian.org/dpkg/dpkg.git>


Building from git source
------------------------

To prepare the source tree before starting the build process, some software
needs to be installed, additional software might provide optional features.

The minimum software required to build dpkg is:

C89 compiler with few C99 extensions (see doc/coding-style.txt)
GNU make
GNU autoconf >= 2.60
GNU automake >= 1.8
GNU gettext >= 0.18
pkg-config
flex
perl

To run the test suite («make check»):

TimeDate perl module
IO-String perl module

To enable optional functionality or programs, this software might be needed:

zlib (used instead of the command-line tool)
liblzma (from the xz project; used instead of the command-line tool)
libbzip2 (from the bzip2 project; used instead of the command-line tool)
libselinux (needed for SELinux support)
curses compatible library (needed for dselect)

To enable translated or additional («make doc») documentation this
software will be needed:

po4a >= 0.36.4
pod2man
doxygen
dot

To enable code coverage («./configure --enable-coverage; make coverage»)
this software is needed:

lcov (from the Linux Test Project)
Devel-Cover perl module


After installing the needed software, and running the following command on
the git tree:

$ autoreconf -f -i

the source should be equivalent to the distributed tar source.


Building from tar source
------------------------

The instructions to build the distributed source are included in the
INSTALL file.

The following configure options might be of interest to disable specific
programs:

--without-dselect
--without-start-stop-daemon
--without-update-alternatives
--without-install-info

And the following to disable modifications to the build flags:

--disable-compiler-warnings
--disable-compiler-optimisations
--disable-linker-optimisations

To see all available configuration options please run «./configure --help».
 

Thread Tools




All times are GMT. The time now is 07:37 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org