[MacPorts] #33540: ld: can't write output file: pstree for architecture x86_64

MacPorts noreply at macports.org
Thu Mar 8 20:39:11 PST 2012


#33540: ld: can't write output file: pstree for architecture x86_64
--------------------------------------+-------------------------------------
 Reporter:  macports@…                |       Owner:  mww@…           
     Type:  defect                    |      Status:  new             
 Priority:  Normal                    |   Milestone:                  
Component:  ports                     |     Version:  2.0.4           
 Keywords:                            |        Port:  pstree          
--------------------------------------+-------------------------------------
Changes (by ryandesign@…):

  * owner:  macports-tickets@… => mww@…


Old description:

> {{
> # port install pstree
> --->  Fetching archive for pstree
> --->  Attempting to fetch pstree-2.33_1.darwin_11.x86_64.tbz2 from
> http://packages.macports.org/pstree
> --->  Fetching pstree
> --->  Verifying checksum(s) for pstree
> --->  Extracting pstree
> --->  Configuring pstree
> --->  Building pstree
> --->  Staging pstree into destroot
> unable to read unknown load command 0x24
> unable to read unknown load command 0x26
> --->  Installing pstree @2.33_1
> --->  Activating pstree @2.33_1
> --->  Cleaning pstree
>
> # pstree
> -sh: /opt/local/bin/pstree: Malformed Mach-o file
>
> # file /opt/local/bin/pstree
> /opt/local/bin/pstree: Mach-O executable x86_64
> }}
>
> In main.log we have:
>
> {{{
> :debug:build Executing org.macports.build (pstree)
> :debug:build Environment: CPATH='/opt/local/include'
> CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_sysutils_pstree/pstree/work/.CC_PRINT_OPTIONS'
> LIBRARY_PATH='/opt/local/lib' CC_PRINT_OPTIONS='YES'
> MACOSX_DEPLOYMENT_TARGET='10.7' GI_SCANNER_DISABLE_CACHE='1'
> :debug:build Assembled command: 'cd
> "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_sysutils_pstree/pstree/work/pstree-2.33"
> && /usr/bin/make -j2 -w all'
> :debug:build Executing command line:  cd
> "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_sysutils_pstree/pstree/work/pstree-2.33"
> && /usr/bin/make -j2 -w all
> :info:build make: Entering directory
> `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_sysutils_pstree/pstree/work/pstree-2.33'
> :info:build /usr/bin/clang -pipe -O1 -arch x86_64 -I/opt/local/include
> -L/opt/local/lib -arch x86_64 pstree.c -o pstree
> :info:build ld: can't write output file: pstree for architecture x86_64
> :info:build clang: error: linker command failed with exit code 1 (use -v
> to see invocation)
> :info:build make: *** [all] Error 1
> :info:build make: Leaving directory
> `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_sysutils_pstree/pstree/work/pstree-2.33'
> :info:build shell command " cd
> "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_sysutils_pstree/pstree/work/pstree-2.33"
> && /usr/bin/make -j2 -w all " returned error 2
> :error:build Target org.macports.build returned: shell command failed
> (see log for details)
> :debug:build Backtrace: shell command failed (see log for details)
>     while executing
> "command_exec build"
>     (procedure "portbuild::build_main" line 8)
>     invoked from within
> "$procedure $targetname"
> :info:build Warning: the following items did not execute (for pstree):
> org.macports.activate org.macports.build org.macports.destroot
> org.macports.install
> :notice:build Log for pstree is at:
> /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_sysutils_pstree/pstree/main.log
> }}}
>

> When omitting the "install" part, things seem to work:
>
> {{{
> # port build pstree
> --->  Fetching pstree
> --->  Verifying checksum(s) for pstree
> --->  Extracting pstree
> --->  Configuring pstree
> --->  Building pstree
>
> #
> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_sysutils_pstree/pstree/work/pstree-2.33/pstree
> | head -2
> -+= 00001 root /sbin/launchd
>  |--= 00010 root /usr/libexec/kextd
> }}}

New description:

 {{{
 # port install pstree
 --->  Fetching archive for pstree
 --->  Attempting to fetch pstree-2.33_1.darwin_11.x86_64.tbz2 from
 http://packages.macports.org/pstree
 --->  Fetching pstree
 --->  Verifying checksum(s) for pstree
 --->  Extracting pstree
 --->  Configuring pstree
 --->  Building pstree
 --->  Staging pstree into destroot
 unable to read unknown load command 0x24
 unable to read unknown load command 0x26
 --->  Installing pstree @2.33_1
 --->  Activating pstree @2.33_1
 --->  Cleaning pstree

 # pstree
 -sh: /opt/local/bin/pstree: Malformed Mach-o file

 # file /opt/local/bin/pstree
 /opt/local/bin/pstree: Mach-O executable x86_64
 }}}

 In main.log we have:

 {{{
 :debug:build Executing org.macports.build (pstree)
 :debug:build Environment: CPATH='/opt/local/include'
 CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_sysutils_pstree/pstree/work/.CC_PRINT_OPTIONS'
 LIBRARY_PATH='/opt/local/lib' CC_PRINT_OPTIONS='YES'
 MACOSX_DEPLOYMENT_TARGET='10.7' GI_SCANNER_DISABLE_CACHE='1'
 :debug:build Assembled command: 'cd
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_sysutils_pstree/pstree/work/pstree-2.33"
 && /usr/bin/make -j2 -w all'
 :debug:build Executing command line:  cd
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_sysutils_pstree/pstree/work/pstree-2.33"
 && /usr/bin/make -j2 -w all
 :info:build make: Entering directory
 `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_sysutils_pstree/pstree/work/pstree-2.33'
 :info:build /usr/bin/clang -pipe -O1 -arch x86_64 -I/opt/local/include
 -L/opt/local/lib -arch x86_64 pstree.c -o pstree
 :info:build ld: can't write output file: pstree for architecture x86_64
 :info:build clang: error: linker command failed with exit code 1 (use -v
 to see invocation)
 :info:build make: *** [all] Error 1
 :info:build make: Leaving directory
 `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_sysutils_pstree/pstree/work/pstree-2.33'
 :info:build shell command " cd
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_sysutils_pstree/pstree/work/pstree-2.33"
 && /usr/bin/make -j2 -w all " returned error 2
 :error:build Target org.macports.build returned: shell command failed (see
 log for details)
 :debug:build Backtrace: shell command failed (see log for details)
     while executing
 "command_exec build"
     (procedure "portbuild::build_main" line 8)
     invoked from within
 "$procedure $targetname"
 :info:build Warning: the following items did not execute (for pstree):
 org.macports.activate org.macports.build org.macports.destroot
 org.macports.install
 :notice:build Log for pstree is at:
 /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_sysutils_pstree/pstree/main.log
 }}}


 When omitting the "install" part, things seem to work:

 {{{
 # port build pstree
 --->  Fetching pstree
 --->  Verifying checksum(s) for pstree
 --->  Extracting pstree
 --->  Configuring pstree
 --->  Building pstree

 #
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_sysutils_pstree/pstree/work/pstree-2.33/pstree
 | head -2
 -+= 00001 root /sbin/launchd
  |--= 00010 root /usr/libexec/kextd
 }}}

--

Comment:

 It sounds like Xcode may not be installed properly. Could you uninstall
 and reinstall Xcode?

-- 
Ticket URL: <https://trac.macports.org/ticket/33540#comment:2>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list