New Ticket     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #19110 (closed defect: fixed)

Opened 3 years ago

Last modified 16 months ago

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@…, 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

Changed 3 years ago by dweber@…

  • owner changed from dweber to dweber@…
  • status changed from new to assigned

Changed 3 years ago by raimue@…

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.

Changed 3 years ago by raimue@…

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

Changed 3 years ago by raimue@…

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.

Changed 3 years ago by raimue@…

  • summary changed from new gdb port : violates the layout of the ports-filesystems! to gdb: Malformed receipt

Changed the description in r49008.

Changed 3 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.

Changed 3 years ago by dweber@…

  • port changed from gdb to gdb binutils

Changed 3 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!

Changed 3 years ago by dweber@…

  • cc pguyot@…, mww added

Changed 3 years ago by devans@…

  • cc mww@… added; mww removed

Changed 3 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]

Changed 3 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?

Changed 3 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).

Changed 3 years ago by dweber@…

  • summary changed from gdb: Malformed receipt to gdb: conflict with binutils version of libiberty.a

Changed 3 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

Changed 3 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?

Changed 3 years ago by anonymous

  • milestone Port Bugs deleted

Milestone Port Bugs deleted

Changed 16 months ago by jmr@…

  • status changed from assigned to closed
  • resolution set to fixed

I guess this was fixed by r66289.

Note: See TracTickets for help on using tickets.