Opened 15 years ago

Closed 14 years ago

#19110 closed defect (fixed)

gdb: conflict with binutils version of libiberty.a

Reported by: dweber@… Owned by: dweber@…
Priority: Normal Milestone:
Component: ports Version: 1.7.0
Keywords: gdb ports-filesystems Cc: pguyot (Paul Guyot), mww@…
Port: gdb binutils

Description

I've added a first draft of a gdb port under devel/gdb for version 6.8 (see revision 48998), and the test on my local repository goes as follows:

Portfile changed since last build; discarding previous state.
--->  Fetching gdb
--->  Verifying checksum(s) for gdb
--->  Extracting gdb
--->  Configuring gdb
--->  Building gdb
--->  Staging gdb into destroot
Warning: violation by /opt/local/info
Warning: gdb violates the layout of the ports-filesystems!
Warning: Please fix or indicate this misbehavior (if it is intended), it will be an error in future releases!
--->  Installing gdb @6.8_0
list must have an even number of elements
Error: Status 1 encountered during processing.

How can I debug this problem? At present, there are no changes to the macport defaults and no hard-coded tweaks to the gdb config. This first draft is a quick draft just to get the process started. I know that macports recommends Xcode build tools, but this port may be useful some day (and it's not in the port tree already, unless it goes by a name that I haven't found in my initial search for it).

Take care, Darren

Change History (18)

comment:1 Changed 15 years ago by dweber@…

Owner: changed from dweber to dweber@…
Status: newassigned

comment:2 Changed 15 years ago by raimue (Rainer Müller)

First step is to run using port -d to get debug output.

$ sudo port -d install gdb
...
--->  Installing gdb @6.8_0
Error: Malformed receipt for gdb @6.8_0
Error: receipt_contents = '}} contents {{/opt/local/var/macports/software/gdb/6.8_0/opt/local/info/configure.info 0 80 33188 116422 {MD5 (/opt/local/var/macports/software/gdb/6.8_0/opt/local/info/configure.info) = cbfc5c1591c16f34e3eb6397afc8aa3f}} {/opt/local/var/macports/software/gdb/6.8_0/opt/local/info/standards.info 0 80 33188 215726 {MD5 (/opt/local/var/macports/software/gdb/6.8_0/opt/local/info/standards.info) = 51cd5c2a1aff742f088c3a9c9c2407e9}} {/opt/local/var/macports/software/gdb/6.8_0/opt/local/lib/libiberty.a 0 80 33188 234280 {MD5 (/opt/local/var/macports/software/gdb/6.8_0/opt/local/lib/libiberty.a) = fe234ddaf8d53becdf4f7cb60b6032ec}}} version 6.8 date 1238613006 categories devel revision 0'
list must have an even number of elements
Warning: the following items did not execute (for gdb): org.macports.activate
Error: Status 1 encountered during processing.

Not sure what triggers a malformed receipt here.

comment:3 Changed 15 years ago by raimue (Rainer Müller)

It seem to be the \t and \n characters in the long_description.

comment:4 Changed 15 years ago by raimue (Rainer Müller)

To get a working receipt again, edit /opt/local/var/macports/receipts/gdb/6.8_0/receipt.bz2 and just delete the description and long_description to read description {foo} long_description {bar} on one line.

comment:5 Changed 15 years ago by raimue (Rainer Müller)

Summary: new gdb port : violates the layout of the ports-filesystems!gdb: Malformed receipt

Changed the description in r49008.

comment:6 Changed 15 years ago by dweber@…

I removed all the \n and \t characters from the long_description. The port still fails to install, ie:

--->  Fetching gdb
--->  Attempting to fetch gdb-6.8.tar.bz2 from http://mirrors.kernel.org/gnu/gdb
--->  Verifying checksum(s) for gdb
--->  Extracting gdb
--->  Configuring gdb
--->  Building gdb
--->  Staging gdb into destroot
Warning: violation by /opt/local/info
Warning: gdb violates the layout of the ports-filesystems!
Warning: Please fix or indicate this misbehavior (if it is intended), it will be an error in future releases!
--->  Installing gdb @6.8_0
--->  Activating gdb @6.8_0
Error: Target org.macports.activate returned: Image error: /opt/local/lib/libiberty.a is being used by the active binutils port.  Please deactivate this port first, or use 'port -f activate gdb' to force the activation.
Error: Status 1 encountered during processing.

comment:7 Changed 15 years ago by dweber@…

Port: binutils added

comment:8 Changed 15 years ago by dweber@…

It appears that gdb needs to install a bunch of stuff into ${prefix}/info (or ${destroot}${prefix}/info, but this path is not a default path in macports. Where are all the info files kept in macports (looks like /opt/local/share/info/)? Maybe there is a configure argument for gdb to have it put the info files into /opt/local/share/info/?

/bin/sh .././etc/../mkinstalldirs /opt/local/var/macports/build/_Users_dweber_ports_devel_gdb/work/destroot/opt/local/info
mkdir /opt/local/var/macports/build/_Users_dweber_ports_devel_gdb/work/destroot/opt/local/info
if test ! -f standards.info; then cd .././etc; fi; \
	if test -f standards.info; then \
	  for i in standards.info*; do \
	    /usr/bin/install -c -m 644 $i /opt/local/var/macports/build/_Users_dweber_ports_devel_gdb/work/destroot/opt/local/info/$i; \
	  done; \
	fi
if test ! -f configure.info; then cd .././etc; fi; \
	if test -f configure.info; then \
	  for i in configure.info*; do \
	    /usr/bin/install -c -m 644 $i /opt/local/var/macports/build/_Users_dweber_ports_devel_gdb/work/destroot/opt/local/info/$i; \
	  done; \
	fi

...

DEBUG: Executing destroot_finish
DEBUG: checking for mtree violations
Warning: violation by /opt/local/info
Warning: gdb violates the layout of the ports-filesystems!
Warning: Please fix or indicate this misbehavior (if it is intended), it will be an error in future releases!

comment:9 Changed 15 years ago by dweber@…

Cc: pguyot@… mww added

comment:10 Changed 15 years ago by dbevans (David B. Evans)

Cc: mww@… added; mww removed

comment:11 Changed 15 years ago by dweber@…

I've found these options below (among others) to tweak configure, so these options should match all the macports defaults, ie:

http://guide.macports.org/#internals.hierarchy

For some reason, these defaults are not all explicit, so I guess the default configure.args cannot assume that all these options below are commonly available. I'll take a stab at getting this right, using configure.args-append to start with, but it would be best for a macports guru to double check my work.

For better control, use the options below.

Fine tuning of the installation directories:
  --bindir=DIR           user executables [EPREFIX/bin]
  --sbindir=DIR          system admin executables [EPREFIX/sbin]
  --libexecdir=DIR       program executables [EPREFIX/libexec]
  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
  --libdir=DIR           object code libraries [EPREFIX/lib]
  --includedir=DIR       C header files [PREFIX/include]
  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
  --infodir=DIR          info documentation [PREFIX/info]
  --mandir=DIR           man documentation [PREFIX/man]

Program names:
  --program-prefix=PREFIX            prepend PREFIX to installed program names
  --program-suffix=SUFFIX            append SUFFIX to installed program names
  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names

System types:
  --build=BUILD     configure for building on BUILD [guessed]
  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
  --target=TARGET   configure for building compilers for TARGET [HOST]

comment:12 Changed 15 years ago by dweber@…

I'm not 100% clear on how to handle this configure option:

  --enable-objc-gc        enable use of Boehm's garbage collector with the
                          GNU Objective-C runtime

Should this be a variant within macports? What is the best way to enable this for the platforms that can handle it? Will this variant depend on a minimal version of gcc?

comment:13 Changed 15 years ago by dweber@…

A few of the configure options are now tweaked in the Portfile and the current install process looks like this:

--->  Fetching gdb
--->  Attempting to fetch gdb-6.8.tar.bz2 from http://mirrors.kernel.org/gnu/gdb
--->  Verifying checksum(s) for gdb
--->  Extracting gdb
--->  Configuring gdb
--->  Building gdb
--->  Staging gdb into destroot
--->  Installing gdb @6.8_0
--->  Activating gdb @6.8_0
Error: Target org.macports.activate returned: Image error: /opt/local/lib/libiberty.a is being used by the active binutils port.  Please deactivate this port first, or use 'port -f activate gdb' to force the activation.
Error: Status 1 encountered during processing.

Please advise how to handle the library conflict, there appears to be no simple way to disable the installation within the gdb build and install process. Maybe there would be a way to script out this library install from the make install target, but the bigger issue is whether the binutils library is compabible with the gdb library, if not then gdb might have runtime issues (and vice versa for binutils).

comment:14 Changed 15 years ago by dweber@…

Summary: gdb: Malformed receiptgdb: conflict with binutils version of libiberty.a

comment:15 Changed 15 years ago by dweber@…

The current port never actually installs the program gdb! All it installs it some info files and the libiberty.a library, ie:

[ dweber@elegans ~/ports ]$ sudo port -d uninstall gdb
--->  Deactivating gdb @6.8_0
DEBUG: deactivating file: /opt/local/share/info/standards.info
DEBUG: deactivating file: /opt/local/share/info/configure.info
DEBUG: /opt/local/share/info is not empty
DEBUG: /opt/local/share is not empty
DEBUG: deactivating file: /opt/local/lib/libiberty.a
DEBUG: /opt/local/lib is not empty
DEBUG: /opt/local is not empty
DEBUG: /opt is not empty
DEBUG: / is not empty
DEBUG: Removing entry from file_map: /opt/local/lib/libiberty.a
DEBUG: Removing entry from file_map: /opt/local/share/info/configure.info
DEBUG: Removing entry from file_map: /opt/local/share/info/standards.info
--->  Uninstalling gdb @6.8_0
DEBUG: uninstalling file: /opt/local/var/macports/software/gdb/6.8_0/opt/local/share/info/standards.info
DEBUG: uninstalling file: /opt/local/var/macports/software/gdb/6.8_0/opt/local/share/info/configure.info
DEBUG: uninstalling directory: /opt/local/var/macports/software/gdb/6.8_0/opt/local/share/info
DEBUG: uninstalling directory: /opt/local/var/macports/software/gdb/6.8_0/opt/local/share
DEBUG: uninstalling file: /opt/local/var/macports/software/gdb/6.8_0/opt/local/lib/libiberty.a
DEBUG: uninstalling directory: /opt/local/var/macports/software/gdb/6.8_0/opt/local/lib
DEBUG: uninstalling directory: /opt/local/var/macports/software/gdb/6.8_0/opt/local
DEBUG: uninstalling directory: /opt/local/var/macports/software/gdb/6.8_0/opt
DEBUG: uninstalling directory: /opt/local/var/macports/software/gdb/6.8_0
DEBUG: uninstalling directory: /opt/local/var/macports/software/gdb
DEBUG: /opt/local/var/macports/software is not empty
DEBUG: /opt/local/var/macports is not empty
DEBUG: /opt/local/var is not empty
DEBUG: /opt/local is not empty
DEBUG: /opt is not empty
DEBUG: / is not empty
--->  Uninstall is removing gdb from the port registry.
DEBUG: deleting directory: /opt/local/var/macports/receipts/gdb/6.8_0
DEBUG: deleting directory: /opt/local/var/macports/receipts/gdb
[ dweber@elegans ~/ports ]$ 

There appear to be no effective options to make, like make install-gdb to get this installed. All it says is nothing to be done. I'm totally missing the point about the standard ./configure; make; make install on this build tree.

So, still more tweaks required to get this REALLY working.

Sorry, Darren

comment:16 Changed 15 years ago by dweber@…

I've tried the following:

a) download the source bundle b)

tar jxvf gdb-6.8.tar.bz2
cd gdb-6.8
./configure
make
sudo make install

cd gdb
./configure

...

configure: error: "*** Gdb does not support native target i386-apple-darwin9.6.0"

Ah, ha! We're up the creek without a paddle! Is this politics? Does this mean that macports will ALWAYS depend on Xcode tools?

comment:17 Changed 15 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

comment:18 Changed 14 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: assignedclosed

I guess this was fixed by r66289.

Note: See TracTickets for help on using tickets.