Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#32049 closed defect (invalid)

perl5 ports: build errors when hostname contains space

Reported by: garcez.sergio@… Owned by: ghosthound
Priority: Normal Milestone:
Component: ports Version: 2.0.3
Keywords: Cc: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez), ryandesign (Ryan Carsten Schmidt)
Port: perl5.8 perl5.10 perl 5.12 perl5.14

Description

I can't seem to perl to build under a clean install of 10.7.2 with Xcode 4.2 and macports 2.0.3. I've tried perl5.8, 5.10, 5.14, with clang and gcc and different patches I found in older tickets to no avail.

Im not sure exactly where its failing but it complains about a syntax error in config.sh and after that makedepend complains about all sorts of things.

The full log is attached. Thanks for your help.

Attachments (1)

perl512.log (1.3 MB) - added by garcez.sergio@… 12 years ago.

Download all attachments as: .zip

Change History (5)

Changed 12 years ago by garcez.sergio@…

Attachment: perl512.log added

comment:1 Changed 12 years ago by mf2k (Frank Schima)

Cc: mcalhoun@… added
Keywords: perl lion removed
Owner: changed from macports-tickets@… to ricci@…

comment:2 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added
Resolution: invalid
Status: newclosed
Summary: Perl 5.x Lion Build Errorsperl5 ports: build errors when hostname contains space

The lines in your output that concern me are:

:info:configure Operating system name? [darwin]  
:info:configure Operating system version? [mbp.home]  

and:

:info:configure Your host name appears to be "sergio's". Right? [y]  

I believe you've somehow set your hostname to "sergio's mbp.home". Neither the apostrophe nor the space are valid characters in hostnames, and the space in particular is causing this havok. The hostname appears in the output of the uname command. The uname command is used by perl to determine your OS version. Perl slices the output of the uname command into space-delimited words and knows which word number contains the OS version. Because your hostname contains a space, that throws off this calculation for all the words that follow. It then doesn't know what OS version you have, takes a guess which turns out to be wrong, and as a result writes a config.sh file that doesn't work.

Fix your hostname (e.g. using the Sharing pane of System Preferences) to contain only valid characters: A-Z, a-z, 0-9, and -. Then clean the affected ports and try again.

comment:3 Changed 12 years ago by garcez.sergio@…

Perfect thanks for that. Although I didnt somehow set my hostname to that, it was a clean Lion install so it which might trip more people up in the future.

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

There has to be something unusual about your system. Perl and Mac OS X have been around for a long time; if this were a general problem it would have been found long ago.

The default computer name on new Mac OS X systems contains spaces and apostrophes, as in "Steve's MacBook Pro". The system converts this to a hostname as "Steves-MacBook-Pro.local" -- it removes punctuation and converts spaces to dashes, making a legal hostname. I don't know how you eded up with a hostname containing a space and an apostrophe. System Preferences: Sharing: Edit doesn't even let you type those characters into the hostname text field. If you upgraded from a prior OS or migrated from a prior computer, perhaps some cruft was leftover somewhere. The ".home" TLD you had is also unusual; the Bonjour TLD Macs use is ".local".

In any case, I'm glad you were able to resolve the issue.

Note: See TracTickets for help on using tickets.