Opened 4 years ago

Closed 3 years ago

#61363 closed defect (invalid)

libiconv @1.16_1 build failure on os x 10.4: stdio.h: No such file or directory

Reported by: sheepdoll (Julie Porter) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.6.3
Keywords: tiger Cc:
Port: libiconv

Description (last modified by jmroot (Joshua Root))

While attempting to install ghostscript on Mac os 10.4.11 the attached log was returned

console text is as follows:

--->  Attempting to fetch libiconv-1.16_1.darwin_8.ppc.tbz2 from http://kmq.jp.packages.macports.org/libiconv
--->  Building libiconv
Error: Failed to build libiconv: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_textproc_libiconv/libiconv/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port ghostscript failed
$ 

Attachments (1)

main.log (109.1 KB) - added by sheepdoll (Julie Porter) 4 years ago.
log from error

Download all attachments as: .zip

Change History (20)

Changed 4 years ago by sheepdoll (Julie Porter)

Attachment: main.log added

log from error

comment:1 Changed 4 years ago by jmroot (Joshua Root)

Description: modified (diff)
Keywords: tiger added; ghostscript libiconv genaliases removed
Owner: set to ryandesign
Port: libiconv added; ghostscript removed
Status: newassigned
Summary: libiconv command execution failed os x 10.4 genaliaseslibiconv @1.16_1 build failure on os x 10.4: stdio.h: No such file or directory
:info:build lib/genaliases.c:20:19: error: stdio.h: No such file or directory

Looks like the Command Line Tools or whatever they were called on Tiger (UNIX Development?) aren't installed. You need to select the option when installing Xcode. https://guide.macports.org/chunked/installing.html#installing.xcode.other

comment:2 Changed 4 years ago by kencu (Ken)

please do this:

sudo port clean libiconv

and then, because I see MacPorts is trying to build with /usr/bin/gcc-4.0, which is very old, please show us what you have installed so far by pasting in or uploading the result of this:

port -v installed

comment:3 Changed 4 years ago by kencu (Ken)

in your log, I also see

-isysroot /Developer/SDKs/MacOSX10.4u.sdk

which as Josh points out does indeed suggest MacPorts is not finding the Unix build tools at /usr/include.

You can install those from the 10.4 disks.

comment:4 Changed 4 years ago by sheepdoll (Julie Porter)

I am still working on this. Here is the text from the port -v installed

$ port -v installed
The following ports are currently installed:
  gperf @3.1_0 (active) platform='darwin 8' archs='ppc' date='2020-10-21T19:51:59-0700'

I am attempting to install ghostscript on a G3 mac laptop using xpostfacto to 10.4.11 There is actually an even older version ghostscript 2.5 from a hack I did back in the 1990s to port xwindows to OS-7.

The drive space is limitid, so I did remove the bloated OSX Gui SDKs as I was not expecting to build anything other than X11 unix type tools. I re-ran the installer as well as running a few separate installs for X11SDK.pkg and BSDSDK.pkg

Now it is even worse I get the error:

$ sudo port install ghostscript
Error: Port ghostscript requires a full Xcode installation, which was not found on your system.
Error: You can install Xcode from the Mac App Store or https://developer.apple.com/xcode/
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port ghostscript failed

Somehow the re-install of Xcode removed the command line tools or paths without warning.

I am now re-installing macports and will report back when I have more info.

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

comment:5 Changed 4 years ago by kencu (Ken)

When you get up and running again, almost nothing can build with the standard compilers that come with Tiger.

The first thing you will need to do is install apple-gcc42 +bootstrap and then reinstall it with apple-gcc42 -bootstrap, This is all the default, but don't try to stop it from occurring, and follow all the instructions you see or it will fail.

I have ghostcript running perfectly fine on Tiger, both Intel and PowerPC, and it works very well, so with some patience, you will get there.

comment:6 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

In 196cfa4929f3b77ab2a29f87f83abf8dff8222b0/macports-ports (master):

libiconv: Use the right SDK for Makefile.devel

Use the right SDK and other CFLAGS when building genaliases and genflags
in Makefile.devel.

See: #61363

comment:7 in reply to:  4 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to sheepdoll:

The drive space is limitid, so I did remove the bloated OSX Gui SDKs as I was not expecting to build anything other than X11 unix type tools.

What exactly do you mean by "OSX Gui SDKs"? What exactly did you remove? We'll probably ask you to reinstall it.

Now it is even worse I get the error:

$ sudo port install ghostscript
Error: Port ghostscript requires a full Xcode installation, which was not found on your system.
Error: You can install Xcode from the Mac App Store or https://developer.apple.com/xcode/
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port ghostscript failed

ghostscript doesn't specifically require a full Xcode install, but MacPorts will consider that all ports require a full Xcode install if either /usr/lib/libxcselect.dylib or /Library/Developer/CommandLineTools/usr/bin/make do not exist, which includes all systems running Mountain Lion or earlier.

MacPorts will only get to the point of showing you this message if it cannot find Xcode installed. It determines that you have Xcode by running xcodebuild -version; try running that and see what it says. If xcodebuild doesn't exist or doesn't work, reinstall Xcode.

Somehow the re-install of Xcode removed the command line tools or paths without warning.

Shouldn't have happened. The Xcode 2.5 installer defaults to installing Xcode and the command line tools; they should only not have been installed if you deliberately unchecked the checkbox in the installer.

Based on the above, sounds like Xcode is not installed properly; reinstall it.

I am now re-installing macports and will report back when I have more info.

Reinstalling MacPorts should change nothing. All you should need to do is correctly install the full unmodified Xcode, including its command line tools.

comment:8 Changed 4 years ago by sheepdoll (Julie Porter)

install apple-gcc42 +bootstrap seemed to have hung after a 12 hours, then exited with an error. (which I forgot to log as it was early in the morning.) I did a clean apple-gcc42 +bootstrap then an attmpt to see if ghostscript would install with the old compiler Now it is attempting to build apple-gcc42 +bootstrap again (probably due to not running it with -bootstrap as told above.) Port -v install did show an additional item: gcc_select @0.1_8

For now I am going to let the apple-gcc42 build run as it is accessing the disk. (when it hung the disk acesses stopped.) I also noticed that the free space went from 792MB to 162MB and I got a low disk space warning error. So it looks like the paging file may have overflowed. This is a pretty stripped down install to fit onto the 11GB drive. A full install of Xcode takes almost 2GB (which is why I attempted to remove what I though were unneeded SDKs.)

For future reference to others with this issue. I did uncheck the command line tools when I attempted to update the SDKs which I had left unchecked on the first Xcode install. I figured that since the CLTs were installed that leaving it unchecked would only install the checked options, not delete the unchecked ones. For the third install I left everything checked exept the documentataion (So it would fit and leave some drive space.)

If the owner of this bug is satisfied, I would reccomend that this bug be closed as resolved.

comment:9 in reply to:  8 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to sheepdoll:

install apple-gcc42 +bootstrap seemed to have hung after a 12 hours, then exited with an error. (which I forgot to log as it was early in the morning.)

If it exited with an error, then that's not a hang. :)

Compilers can take a long time to compile. 12 hours or even much more might not be an unreasonable time to need to wait on an old PowerPC machine.

For now I am going to let the apple-gcc42 build run as it is accessing the disk. (when it hung the disk acesses stopped.) I also noticed that the free space went from 792MB to 162MB and I got a low disk space warning error. So it looks like the paging file may have overflowed. This is a pretty stripped down install to fit onto the 11GB drive.

How much memory does the computer have? I wouldn't necessarily leap to the conclusion that the disk is filling up with swap space, but you can check if that is the case by examining the contents of /private/var/vm. It seems more likely to me that the build is using up the disk space as any build normally would and there just isn't enough space available for all the intermediate files it needs to build. 11GB may not be a large enough disk for having both the OS and Xcode installed and being able to compile software, especially something as large as a compiler.

If you can temporarily attach an additional larger disk while building, you might be able to remove the directory /opt/local/var/macports/build and replace it with a symlink to a folder on your larger disk. MacPorts doesn't expect you to do this, so I'm not sure if it will fully work, but you could try it. Of course doing this will prevent building anything unless that additional disk is attached. You can revert the modification later by replacing the symlink with a real directory again.

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

If you use the -d flag while installing (sudo port -d install ...) you can see what it's doing as it does it. This, combined with CPU activity in Activity Monitor, can help you determine whether it has stopped doing anything or whether it's just doing things slowly.

comment:11 Changed 4 years ago by kencu (Ken)

Perhaps you might persuade Ryan to put up a few of the real dogs to build on the prebuilt binaries website. This is killing people, really.

gcc-4.2 (both +bootstrap and -bootstrap), the parts of libgcc we need from gcc6 and gcc7, and then gcc6 and gcc7, would be enough to stop the carnage. With those, the steps to building the rest yourself would be much more tolerable.

comment:12 Changed 4 years ago by sheepdoll (Julie Porter)

All of these comments are correct. The build is filling up the op/local/var/macports filters I am currently moving the unneeded apps to the Mac OS 9 partition this can free another 500MB With a computer this old external drives are not available. I do have a USB 1.0 card, which would be painfully slow.

Prebuilt binaries would be an excelent solution for these old dogs

comment:13 Changed 4 years ago by sheepdoll (Julie Porter)

above should read "folder" not "filters"

Now running apple-gcc42 install with -d option after doing a port -fp uninstall installed} to clean up the bits and pieces of fragments that have been installed over the last few days.

Also note I am running this on a G3 ppc, otherwise I woudl simply move the working G4 version to the G3 ppc.

comment:14 Changed 4 years ago by kencu (Ken)

I think you could move the G4 version to the G3 -- if I recall we build these with all CPU subtypes, so it should run. I move my G5 binaries to the G4 all the time, but I haven't tried with my (several) G3s.

I have set up my own binaries sharing website to share all thees binaries between my home machines, and I build them on the fastest machine, and spread them to the others.

Last edited 4 years ago by kencu (Ken) (previous) (diff)

comment:15 Changed 4 years ago by sheepdoll (Julie Porter)

After a week of compiling, It overflowed the hard drive again. This time on libgcc7.

One issue with these legacy small machines is the whole package including man pages and docs are also downloaded and installed. This eats valuable drive space. I symlinked some of this to the OS9 partition

Pre-compiled binaries may be the solution to this bug this bug. Especially as apple had an 8GB limit to the maximum an ata drive could store at the time. A full install of X-code takes 2GB.

Cleaning the failed libgcc7 frees over a gigabyte of drive space. I moved everything I could to the second partition. I attempted a stand alone install of libgcc7 and got the same results after the clean.

As I recall my other G4 (running lion) had an Endian issue with some of the rendered images, part of why I wanted to do an install for the G3 tiger.

comment:16 Changed 4 years ago by sheepdoll (Julie Porter)

I did some more searching and libgcc7 tiger has a number of bugs against it. It may take 6GB of space to build. I tried port -b install libgcc7 and got a suggestion to file a bug as this package does not exits for "10.4.11 Tiger"

So how do I get the precompiled-binaries (pakages) for gcc7? http://packages.macports.org/NameOfThePort/ does not seem to have any legacy powerpc binaries. THese are unlikly to change much for a 20 some year old system.

comment:17 Changed 4 years ago by kencu (Ken)

If you email me directly at kencu@… I can help you find some useful binaries, I believe.

comment:18 in reply to:  16 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to sheepdoll:

One issue with these legacy small machines is the whole package including man pages and docs are also downloaded and installed. This eats valuable drive space.

Correct, ports install manpages, and there is no option to turn this off. Other documentation is sometimes available as a separate port or a variant that you can choose not to install, but other times it is included unconditionally in the main port. Our decisions about what to include in a port tend to be guided by what features many users will expect to be available, even if not all users need those features, and even if it comes at the expense of some disk space.

Pre-compiled binaries may be the solution to this bug this bug. Especially as apple had an 8GB limit to the maximum an ata drive could store at the time. A full install of X-code takes 2GB.

I'm not familiar with an 8GB limit. From what I read, on very early Mac OS X-capable Macs, the boot partition can be no larger than 8GB and must reside within the first 8GB of the disk, but the disk can be up to 128GB in size. Or you can add a second disk, such as a FireWire disk. So you should be able to have a small boot disk and then a larger disk or partition that you install MacPorts on.

As I recall my other G4 (running lion) had an Endian issue with some of the rendered images, part of why I wanted to do an install for the G3 tiger.

I'm not sure exactly what issue you're referring to here, but if the software you're trying to install has endian issues on a G4, then you'll almost certainly see the same issues on a G3, since all PowerPC processors used in Macs use the same endianness. Snow Leopard and Lion and all later versions of macOS cannot be installed on a PowerPC, so you certainly do not have Lion on a G4.

Replying to sheepdoll:

I tried port -b install libgcc7 and got a suggestion to file a bug as this package does not exits for "10.4.11 Tiger"

So how do I get the precompiled-binaries (pakages) for gcc7? http://packages.macports.org/NameOfThePort/ does not seem to have any legacy powerpc binaries.

Apologies, the wording of the message is a little unclear. The message is not intended to instruct you to file a bug report unconditionally. Rather, it is meant to let you know that you can file a bug report if you believe the condition to be a bug.

It it not a bug that there is no binary package available for Tiger. We have never offered any binary packages for any port for Tiger. For a time we offered binaries for Leopard on PowerPC, but the hardware doing those builds has failed and I have not spent the time to replace it. We are all volunteers who have limited time to work on MacPorts, and we are more likely to spend our time trying to fix the countless problems that Apple's release of Xcode 12 has caused for our ports, and the countless problems that Apple's impending release of Apple Silicon-based machines will cause, because those problems affect or will affect a much larger number of users.

THese are unlikly to change much for a 20 some year old system.

That's not true in MacPorts. We don't have separate collections of ports for different operating systems, and we don't freeze our entire ports collection for old systems. Our ports tree sees a hundred changes every day. After each change, our build machines for 10.6 and later build the ports and make the binaries available. We could set up Power Macs running 10.4 and 10.5 to try to build binaries for those systems, but right now we don't have that.

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

Resolution: invalid
Status: assignedclosed

I'm going to close this since there is nothing to be fixed in libiconv.

Note: See TracTickets for help on using tickets.