Segfaults when staging into destroot

Ryan Schmidt ryandesign at macports.org
Thu Oct 4 15:39:09 PDT 2007


On Oct 4, 2007, at 17:23, Dave Murray-Rust wrote:

> On 4 Oct 2007, at 23:01, Ryan Schmidt wrote:
>
>> On Oct 4, 2007, at 04:29, Dave Murray-Rust wrote:
>>
>>> On 1 Oct 2007, at 11:41, Dave Murray-Rust wrote:
>>>
>>>> On 1 Oct 2007, at 10:51, Ryan Schmidt wrote:
>>>>
>>>>> On Oct 1, 2007, at 04:45, Dave Murray-Rust wrote:
>>>>>
>>>>>> On 1 Oct 2007, at 07:28, Ryan Schmidt wrote:
>>>>>>
>>>>>>> On Sep 22, 2007, at 13:59, Dave Murray-Rust wrote:
>>>>>>>
>>>>>>>> I'm having real hassles with port - most packages fail to  
>>>>>>>> install, with a segfault, e.g.:
>>>>>>> Make sure you have the latest OS and all updates (10.4.10 or  
>>>>>>> 10.3.9). Make sure you have the latest Xcode (2.4.1 for  
>>>>>>> 10.4.10; 1.5 for 10.3.9). Make sure you have the latest  
>>>>>>> MacPorts (1.5.2). Make sure you do NOT have anything at all  
>>>>>>> installed in /sw, /usr/local or any other place referenced in  
>>>>>>> your PATH. Just have MacPorts, which is usually in /opt/ 
>>>>>>> local. It works great by itself, but other software installed  
>>>>>>> in other locations can cause unpredictable problems.
>>>>>>
>>>>>> OSX == 10.4.10, Xcode == 2.4.1
>>>>>> OK, I've moved everything which was installed (temporarily):
>>>>>
>>>>> Don't know what's going on. I agree with Paul -- can we see  
>>>>> some debug output please?
>>>>>
>>>>> sudo port clean --work zlib
>>>>> sudo port -dv install zlib
>>>
>>> [output moved to the bottom for readability]
>>>
>>> Just wondering if there's any more debug output which would be  
>>> useful to diagnose this?
>>
>> [snip]
>>
>>>> DEBUG: Executing proc-post-org.macports.destroot-destroot-0
>>>> xinstall: mkdir /opt/local/var/macports/build/ 
>>>> _opt_local_var_macports_sources_rsync.macports.org_release_ports_ar 
>>>> chivers_zlib/work/destroot/opt/local/share/doc
>>>> xinstall: mkdir /opt/local/var/macports/build/ 
>>>> _opt_local_var_macports_sources_rsync.macports.org_release_ports_ar 
>>>> chivers_zlib/work/destroot/opt/local/share/doc/zlib-1.2.3
>>>> xinstall: chdir(/opt/local/var/macports/build/ 
>>>> _opt_local_var_macports_sources_rsync.macports.org_release_ports_ar 
>>>> chivers_zlib/work/zlib-1.2.3)
>>>> xinstall: ChangeLog -> /opt/local/var/macports/build/ 
>>>> _opt_local_var_macports_sources_rsync.macports.org_release_ports_ar 
>>>> chivers_zlib/work/destroot/opt/local/share/doc/zlib-1.2.3/ChangeLog
>>>> tclsh(8352) malloc: *** error for object 0x313390: double free
>>>> tclsh(8352) malloc: *** set a breakpoint in szone_error to debug
>>>> xinstall: FAQ -> /opt/local/var/macports/build/ 
>>>> _opt_local_var_macports_sources_rsync.macports.org_release_ports_ar 
>>>> chivers_zlib/work/destroot/opt/local/share/doc/zlib-1.2.3/FAQ
>>>> Segmentation fault
>>
>> So it's crashing during the post-destroot phase, which is defined  
>> thusly in the zlib port:
>>
>> post-destroot {
>>     xinstall -m 0755 -d ${destroot}${docdir}
>>     xinstall -m 0644 -W ${worksrcpath} ChangeLog FAQ README $ 
>> {destroot}${docdir}
>> }
>>
>> I don't see anything unusual there.
>>
>> This is my tclsh on 10.4.10 Intel:
>>
>> $ which tclsh
>> /usr/bin/tclsh
>> $ md5 /usr/bin/tclsh
>> MD5(/usr/bin/tclsh)= 642ea28f28318b817607f17c13570ecc
>> $ ls -l /usr/bin/tclsh
>> lrwxr-xr-x   1 root  wheel  8 Jul 13 05:20 /usr/bin/tclsh -> tclsh8.4
>> $ ls -l /usr/bin/tclsh8.4
>> -r-xr-xr-x   1 root  wheel  29656 Dec  7  2006 /usr/bin/tclsh8.4
>> $
>>
>> Are you on Intel or PowerPC, and what does yours look like?
>
> Interesting - my tclsh looks quite different to yours:
>
> vpn-014:537:java>which tclsh
> /usr/bin/tclsh
> vpn-014:539:java>md5 $( which tclsh )
> MD5 (/usr/bin/tclsh) = e5714aeaec73ef89de5076efb4289c39
> vpn-014:540:java>ls -l /usr/bin/tclsh
> lrwxr-xr-x   1 root  wheel  8 Aug 21 15:26 /usr/bin/tclsh -> tclsh8.4
> vpn-014:541:java>ls -l /usr/bin/tclsh8.4
> tclsh8.4    tclsh8.4.7
> vpn-014:541:java>ls -l /usr/bin/tclsh8.4
> -r-xr-xr-x   1 root  wheel  13796 Jun  6  2005 /usr/bin/tclsh8.4
>
>
> It's an intel mac:
> vpn-014:542:java>uname -a
> Darwin groke.config 8.10.1 Darwin Kernel Version 8.10.1: Wed May 23  
> 16:33:00 PDT 2007; root:xnu-792.22.5~1/RELEASE_I386 i386 i386
>
> Maybe my tclsh is broken - certainly the fact its half the size of  
> yours is worrying! Is there a good way to rebuild/reinstall it?

Ok, so your tclsh8.4 is also less than half the size of mine... and  
is from a year and a half earlier than mine. Odd. You also showed  
that you have a tclsh8.4.7 in /usr/bin, which I do not have:

$ ls -l /usr/bin/tcl*
lrwxr-xr-x   1 root  wheel      8 Jul 13 05:20 /usr/bin/tclsh ->  
tclsh8.4
-r-xr-xr-x   1 root  wheel  29656 Dec  7  2006 /usr/bin/tclsh8.4

Perhaps you tried to build tclsh from source at some point, or  
installed a binary of tclsh, and it overwrote your system tclsh? In  
any case, I believe Apple provides tclsh8.4 in "BSD.pkg" so you could  
try reinstalling that package from your Mac OS X 10.4 Intel DVD. Then  
you should probably also download the Mac OS X 10.4.10 Intel Combo  
Update from Apple Support Downloads and run it again, if it'll let  
you. (I don't know if any components from BSD.pkg have been updated  
since 10.4.0 but it's possible.)




More information about the macports-users mailing list