Opened 9 years ago

Closed 8 years ago

#48178 closed defect (fixed)

circular dependency apple-gcc42/xpm, and many others

Reported by: herzog-bernd Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.3.3
Keywords: Cc: ryandesign (Ryan Carsten Schmidt), jeremyhu (Jeremy Huddleston Sequoia)
Port: apple-gcc42

Description (last modified by ryandesign (Ryan Carsten Schmidt))

Machine: PowerBook G4, 15"

PowerBook5,4

CPU-Type: PowerPC G4 (1.1)

OS Version: 10.4.11

Xcode verson: 2.4.1

Problem:

========

The attempt to install xemacs,

sudo port install xemacs

failes since the port 'apple-gcc42' is required, which in turn requires 'xpm' The install procedure stops with the message

:error:build failed to install apple-gcc42
:debug:build Registry error: xpm not registerd as installed & active

in the logfile /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_apple-gcc42/apple-gcc42/main.log

The attempt to install xpm,

sudo port install xpm

failes since the port 'apple-gcc42' is required

The xpm is by far not the only port which is in such a circular relation to apple-gcc42. Part of the error message was a list (see below). I just tried several ports at the beginning and at the end of the list. It turned out that all these are in the same circular dependency to 'apple-gcc42' like 'xpm'.

Error: The following dependencies were not installed:
Xaw3d apple-gcc42 pkgconfig libiconv gperf xorg-libXext autoconf gettext expat ncurses m4 xz
automake libtool xorg-libX11 xorg-bigreqsproto xorg-inputproto xorg-kbproto xorg-libXau
xorg-xproto xorg-libXdmcp xorg-libxcb python27 bzip2 db48 db_select libedit openssl zlib
python2_select python_select sqlite3 xorg-libpthread-stubs xorg-xcb-proto libxml2 xorg-util-macros
xorg-xcmiscproto xorg-xextproto xorg-xf86bigfontproto xorg-xtrans xorg-libXmu xorg-libXt xorg-libsm
xorg-libice xpm compface gdbm jpeg libpng tiff xbitmaps xorg-libXaw groff ghostscript fontconfig
freetype jbig2dec libidn libpaper perl5 perl5.16 netpbm gmake jasper jbigkit libnetpbm subversion
apr apr-util db46 curl-ca-bundle cyrus-sasl2 kerberos5 libcomerr libmagic serf1 scons psutils

Attachments (9)

main.log (23.0 KB) - added by ryandesign (Ryan Carsten Schmidt) 9 years ago.
main.2.log (1.9 MB) - added by herzog-bernd 9 years ago.
config.log (79.7 KB) - added by herzog-bernd 9 years ago.
cleanGcc42Log.txt (135 bytes) - added by herzog-bernd 9 years ago.
installGcc42Log.txt (1.2 KB) - added by herzog-bernd 9 years ago.
config.2.log (10.6 KB) - added by herzog-bernd 9 years ago.
build_gcc1.xc (794 bytes) - added by herzog-bernd 9 years ago.
configure1Log.txt (4.1 KB) - added by herzog-bernd 9 years ago.
build_gcc1.xc configure command output
bootstrap1Log.txt (505.4 KB) - added by herzog-bernd 9 years ago.
build_gcc1.xc bootstrap command output

Change History (19)

comment:1 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added; herzog@… removed
Description: modified (diff)

It is true that most ports on Tiger will require apple-gcc42 because that is the default compiler on Tiger.

However, I don't know why building apple-gcc42 would require xpm. Could you please attach the main.log file from your failed apple-gcc42 build?

comment:2 in reply to:  1 Changed 9 years ago by herzog-bernd

The content of the main log file /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_apple-gcc42/apple-gcc42/main.log is as follows. Maybe it has change, since I tried, aftert the install attempt of xemacs, to install xpm, xorg-libice, xorg-xtrans.Should I redo 'sudo port install xemacs'?

attachment:main.log

Last edited 9 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: main.log added

comment:3 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Don't forget to use WikiFormatting where needed, such as when showing lines of terminal output.

It's better to attach large output than to paste it. I've converted your log into an attachment.

It says:

:debug:main Skipping completed org.macports.configure (apple-gcc42)

This indicates it was not a clean build attempt. Please "sudo port clean apple-gcc42", then try again. If it fails again, attach the new main.log.

It also says:

:info:build checking for C compiler default output file name... configure: error: C compiler cannot create executables
:info:build See `config.log' for more details.

If this error happens again after you clean and try again, please attach the config.log as well.

Changed 9 years ago by herzog-bernd

Attachment: main.2.log added

Changed 9 years ago by herzog-bernd

Attachment: config.log added

Changed 9 years ago by herzog-bernd

Attachment: cleanGcc42Log.txt added

Changed 9 years ago by herzog-bernd

Attachment: installGcc42Log.txt added

comment:4 in reply to:  3 ; Changed 9 years ago by herzog-bernd

I did as you told me:

cd ~/MacPorts/
sudo port clean apple-gcc42 2>&1 | tee ./cleanGcc42Log.txt
port install apple-gcc42 2>&1 | tee ./installGcc42Log.txt

Again there is the message 'C compiler cannot create executables' I am attaching the above *Log.txt files and the main.log. I am not sure which config.log You have in mind, so I am attaching the one inside the MacPorts-2.3.3 folder.

P.S.: Unfortunately I do not know anything about WikiFormatting. I will try to learn it as soon as I have the time for. At the moment can spend only few minutes for communication, and I think, to be fast is more important than to be correct. Please excuse me.

Last edited 9 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:5 in reply to:  4 Changed 9 years ago by larryv (Lawrence Velázquez)

Replying to herzog@…:

Again there is the message 'C compiler cannot create executables' I am attaching the above *Log.txt files and the main.log. I am not sure which config.log You have in mind, so I am attaching the one inside the MacPorts-2.3.3 folder.

It’s not entirely clear which configure run is failing, but I think the relevant config.log is one of these:

  • $(port work apple-gcc42)/objroot/obj-x86_64-i686/intl/config.log
  • $(port work apple-gcc42)/objroot/obj-x86_64-x86_64/intl/config.log

Please attach both.

P.S.: Unfortunately I do not know anything about WikiFormatting. I will try to learn it as soon as I have the time for. At the moment can spend only few minutes for communication, and I think, to be fast is more important than to be correct. Please excuse me.

The most important bit for our purposes is the use of triple braces for creating preformatted text. Such text is rendered inside an HTML pre tag, so newlines and whitespace are respected.

[titan] 92100 % printf '%s\n' 'like this'                  ../MacPorts/svn/trunk/base/src/port1.0 (svn:macports/138153)
like this
[titan] 92101 % ls                                         ../MacPorts/svn/trunk/base/src/port1.0 (svn:macports/138153)
Makefile			portconfigure.tcl		portmirror.tcl
Makefile.in			portdeactivate.tcl		portpatch.tcl
fetch_common.tcl		portdepends.tcl			portreload.tcl
pkgIndex.tcl			portdestroot.tcl		portsandbox.tcl
port.tcl			portdistcheck.tcl		portstartupitem.tcl
port_autoconf.tcl		portdistfiles.tcl		porttest.tcl
port_autoconf.tcl.in		portextract.tcl			porttrace.tcl
port_test_autoconf.tcl		portfetch.tcl			portuninstall.tcl
port_test_autoconf.tcl.in	portinstall.tcl			portunload.tcl
portactivate.tcl		portlint.tcl			portutil.tcl
portbuild.tcl			portlivecheck.tcl		tests/
portchecksum.tcl		portload.tcl
portclean.tcl			portmain.tcl
[titan] 92102 % printf '\n\n\n\n\n'                        ../MacPorts/svn/trunk/base/src/port1.0 (svn:macports/138153)





[titan] 92103 %                                            ../MacPorts/svn/trunk/base/src/port1.0 (svn:macports/138153)

comment:6 Changed 9 years ago by herzog-bernd

As an attachment, please find

/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_apple-gcc42/apple-gcc42/work/objroot/obj-powerpc-powerpc/intl/config.log

The config.log files You mention don't exist:

$(port work apple-gcc42)/objroot/obj-x86_64-i686/intl/config.log
$(port work apple-gcc42)/objroot/obj-x86_64-x86_64/intl/config.log

explicitely:

/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_apple-gcc42/apple-gcc42/work/objroot/obj-x86_64-i686/intl/config.log
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_apple-gcc42/apple-gcc42/work/objroot/obj-x86_64-x86_64/intl/config.log

The path names seem to point to Intel directories. The machine in question is a Power PC Macintosh.

Best, Bernd Herzog.

Last edited 9 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

Changed 9 years ago by herzog-bernd

Attachment: config.2.log added

comment:7 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

The config.log says the reason for the problem is:

ERROR: No debug map or DWARF data was found to link.

Googling that error, I found another project explaining that this error can be resolved by upgrading to Xcode 2.5. Can you try that?

comment:8 Changed 9 years ago by herzog-bernd

A change to Xcode 2.5 would be a problem for me, since several of my projects building very well with Xcode 2.4.1 don't with Xcode 2.5. Mainly because of a change in Interface Builder. Moreover, according to Apple's release notes, Xcode 2.5 cannot be used to develop for Mac OS 10.5. A change to Xcode 3 seems to be impossible, too, since it doesn't run with Mac OS 10.4.

Nevertheless, I have tried to use Xcode 2.5 running the system from an external drive, and the problem remains.

So I returned to Xcode 2.4.1 and tried to build apple-gcc42 manually following the hints in the file

	$(port work apple-gcc42)/gcc-5666.3/README.Apple

I created a folder

	testplace,

copied the archive 'gcc-5666.3.tar.gz' into a subdirectory of my home directory, expanded it into a folder named

	gcc-5666.3,

changed into this folder and called

	mkdir darwin
	cd darwin
	../configure --prefix=/testplace
	make bootstrap
	make install

Already the configure script is a problem. It assumes that the minimum Mac OX is system 10.5 and that the source root is

	/Developer/SDKs/MacOSX10.5.sdk

Such a source root directory doesn't exist, neither with Xcode 2.4.1 nor with Xcode 2.5. So one shouldn't be worried that compilation fails. I tried to call configure with the option

	--with-build-sysroot=/Developer/SDKs/MacOSX10.4u.sdk

Actually, I added further options to be as close as possible to the call done by the apple-gcc42 port:

	--prefix=/testplace
	--enable-languages=c,c++,objc,obj-c++
	--with-system-zlib
	--disable-nls
	--with-slibdir=/usr/lib
	--with-gxx-include-dir=/usr/include/c++/4.0.0
	--host=powerpc-apple-darwin8
	--target=powerpc-apple-darwin8

In addition, I had to create a directory

	testplace/powerpc-apple-darwin8/lib

to avoid 'no such directory' errors from the bootstrap script and a hard link

	testplace/powerpc-apple-darwin8/include

pointing to /usr/include, for otherwise, after a time of compilation, I got complains that c standard headers like 'errno.h' and 'time.h' were missing. I am not sure whether the link points to the correct location. Maybe it should point to a location inside the '/opt' directory containing these headers?

Finally, at the end of the build process for 'libgcc_s.1.dylib.tmp', the linker reports

	/usr/bin/ld: -syslibroot: multiply specified

and stops execution of the bootstrap script. Indeed one finds as arguments to the linker both

	-isysroot /Developer/SDKs/MacOSX10.4u.sdk (specified twice)
	and
	-isysroot/Developer/SDKs/MacOSX10.5.sdk

This seems to be a build or configure script or Makefile bug. Since I have no idea about the gcc build mechanism I even don't know where to look for it.

All the actions above are assembled in the script

	build_gcc1.xc

and its output in the text files

	configure1Log.txt
	bootstrap1Log.txt

(attached to this report).

Changed 9 years ago by herzog-bernd

Attachment: build_gcc1.xc added

Changed 9 years ago by herzog-bernd

Attachment: configure1Log.txt added

build_gcc1.xc configure command output

Changed 9 years ago by herzog-bernd

Attachment: bootstrap1Log.txt added

build_gcc1.xc bootstrap command output

comment:9 Changed 9 years ago by herzog-bernd

My claim that the build of 'apple-gcc42' fails with Xcode 2.5 is wrong. The second attempt to upgrade from Xcode 2.4.1 to version 2.5 and then to install 'apple-gcc42' was successful. Actually I can't tell what went wrong in the first attempt. Maybe the deinstallation of the old Xcode version was incorrect.

Questions:

	1)	Is it possible to return to the old Xcode version now?
	2)	Is it possible to use MacPorts applications from a different
		startup disc, where Xcode 2.4.1 and no MacPorts data are
                installed ?

Best, Bernd Herzog

comment:10 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: jeremyhu@… added
Resolution: fixed
Status: newclosed

Thanks for confirming. I've updated the apple-gcc42 port to require Xcode 2.5 in r151945.

Presumably it would be no problem to go back to an older Xcode now if you wanted to. Of course, if MacPorts publishes an update for apple-gcc42, you'll need Xcode 2.5 again to build it.

Software installed with MacPorts is designed to be used on the computer and OS on which it was installed. You should not, for example, use MacPorts installed on an external drive attached to a PowerBook G4 running Tiger to install some ports, then move that external drive to a MacBook Pro running El Capitan and expect the software you installed with MacPorts on Tiger to be usable there.

But if you mean just running MacPorts-installed software from another disk, on the same computer and same OS version, then that's more likely to work. MacPorts and Xcode are not needed to run the software that was installed, only to install it in the first place. You may need to account for different paths, however. If you installed software on your startup disk using MacPorts in /opt/local, and then later boot up from a different disk, now MacPorts is no longer at /opt/local but is instead at /Volumes/YourDiskName/opt/local. Most software installed with MacPorts can't be run from another path; you'll get an error that libraries can't be found at the original /opt/local/... path. The simple workaround for this problem is to create an appropriate /opt/local symlink on your new boot disk. For example:

sudo mkdir -p /opt
cd /opt
sudo ln -s /Volumes/YourDiskName/opt/local local

Before you do this, if YourDiskName contains spaces or other special characters, use the Finder to rename it so that it doesn't. For example, if the disk you have MacPorts on is named "Macintosh HD", rename it to e.g. "MacintoshHD".

Note: See TracTickets for help on using tickets.