Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#46953 closed defect (invalid)

libexpat.dylib was built for i386 which is not the architecture being linked

Reported by: mhng1580@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.3.3
Keywords: Cc: ryandesign (Ryan Carsten Schmidt)
Port: expat

Description

I get the following error when I tried to install fontconfig

--->  Rebuilding in order
     fontconfig @2.11.1
--->  Computing dependencies for fontconfig
--->  Fetching distfiles for fontconfig
--->  Verifying checksums for fontconfig
--->  Extracting fontconfig
--->  Applying patches to fontconfig
--->  Configuring fontconfig
Error: Failed to configure fontconfig, consult /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_fontconfig/fontconfig/work/fontconfig-2.11.1/config.log
Error: org.macports.configure for port fontconfig returned: configure failure: command execution failed
Please see the log file for port fontconfig for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_fontconfig/fontconfig/main.log
Error: Unable to upgrade port: 1
Error rebuilding fontconfig
    while executing
"error "Error rebuilding $portname""
    (procedure "revupgrade_scanandrebuild" line 395)
    invoked from within
"revupgrade_scanandrebuild broken_port_counts $opts"
    (procedure "macports::revupgrade" line 5)
    invoked from within
"macports::revupgrade $opts"
    (procedure "action_revupgrade" line 2)
    invoked from within
"action_revupgrade $action $portlist $opts"
    (procedure "action_target" line 96)
    invoked from within
"$action_proc $action $portlist [array get global_options]"
    (procedure "process_cmd" line 103)
    invoked from within
"process_cmd $remaining_args"
    invoked from within
"if { [llength $remaining_args] > 0 } {

    # If there are remaining arguments, process those as a command
    set exit_status [process_cmd $remaining..."
    (file "/opt/local/bin/port" line 5268)

I checked the main.log file, and it showed

expat is required. or try to use --enable-libxml2

But when I tried to rebuild expat and xml2, it seems that they both depend on fontconfig and the same error when building fontconfig shows up again.

Attachments (3)

main.log (18.2 KB) - added by mhng1580@… 10 years ago.
main.log
config.log (84.3 KB) - added by mhng1580@… 10 years ago.
config.log
installed.txt (6.3 KB) - added by mhng1580@… 10 years ago.
port -v installed

Download all attachments as: .zip

Change History (6)

Changed 10 years ago by mhng1580@…

Attachment: main.log added

main.log

Changed 10 years ago by mhng1580@…

Attachment: config.log added

config.log

Changed 10 years ago by mhng1580@…

Attachment: installed.txt added

port -v installed

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

The error in the config.log is:

ld: warning: ignoring file /opt/local/lib/libexpat.dylib, file was built for i386 which is not the architecture being linked (x86_64): /opt/local/lib/libexpat.dylib

Why is this the case? How did this happen? Did you install some third-party software that overwrote some of your MacPorts-installed software?

The solution to this particular error is to rebuild expat, which you can do by running:

sudo port clean expat
sudo port -n upgrade --force expat

However, if your expat was overwritten, who knows how many of your other ports have been overwritten. It might be safest and easiest to uninstall all ports, and MacPorts itself, and remove the /opt/local directory entirely, as per our uninstall instructions, then reinstall MacPorts and the ports you want.

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

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

Cc: ryandesign@… added
Keywords: fontconfig expat libxml2 mac10.9.5 removed
Port: fontconfig libxml2 removed
Resolution: invalid
Status: newclosed
Summary: fontconfig @2.11.1 configure error -build failurelibexpat.dylib was built for i386 which is not the architecture being linked

comment:3 in reply to:  1 Changed 10 years ago by mhng1580@…

Replying to ryandesign@…:

I uninstalled it and installed again. Everything runs well now. Thanks!

The error in the config.log is:

ld: warning: ignoring file /opt/local/lib/libexpat.dylib, file was built for i386 which is not the architecture being linked (x86_64): /opt/local/lib/libexpat.dylib

Why is this the case? How did this happen? Did you install some third-party software that overwrote some of your MacPorts-installed software?

The solution to this particular error is to rebuild expat, which you can do by running:

sudo port clean expat
sudo port -n upgrade --force expat

However, if your expat was overwritten, who knows how many of your other ports have been overwritten. It might be safest and easiest to uninstall all ports, and MacPorts itself, and remove the /opt/local directory entirely, as per our uninstall instructions, then reinstall MacPorts and the ports you want.

Note: See TracTickets for help on using tickets.