Opened 11 years ago

Closed 11 years ago

#42788 closed defect (fixed)

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

Reported by: pdm@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.2.1
Keywords: Cc: quentin.riffard@…
Port: freetype

Description

Hi,

Freetype is failing to build on a port upgrade outdated. port clean does not help.

Attachments (1)

main.log (416.2 KB) - added by pdm@… 11 years ago.

Download all attachments as: .zip

Change History (7)

Changed 11 years ago by pdm@…

Attachment: main.log added

comment:1 in reply to:  description ; Changed 11 years ago by pdm@…

Because the log file is big, here is a copy of the error message.

:info:build ld: warning: ignoring file /opt/local/lib/libharfbuzz.dylib, file was built for x86_64 which is not the architecture being linked (i386): /opt/local/lib/libharfbuzz.dylib
:info:build Undefined symbols for architecture i386:
:info:build   "_hb_buffer_add_utf32", referenced from:
:info:build       _af_get_char_index in autofit.o
:info:build   "_hb_buffer_create", referenced from:
:info:build       _af_get_char_index in autofit.o

...

:info:build ld: symbol(s) not found for architecture i386
:info:build clang: error: linker command failed with exit code 1 (use -v to see invocation)

comment:2 Changed 11 years ago by pdm@…

Ticket #42786 may or may not be related...

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

Cc: ryandesign removed
Owner: changed from macports-tickets@… to ryandesign@…

The Cc field requires complete email addresses.

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

Resolution: invalid
Status: newclosed

Replying to pdm@…:

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

So, I see you're trying to build freetype universal, but for some reason libharfbuzz is not universal. This should not be possible. The only way I can think of for this to happen is if you ran some third-party software installer which replaced libharfbuzz with a non-universal version. We have a problem hotlist entry dealing with that scenario. You can try rebuilding harfbuzz to fix this:

sudo port -n upgrade --force harfbuzz

But if a third-party installer overwrote parts of MacPorts, then who knows how many other libraries you've replaced with incorrect versions, and your best bet is to uninstall all ports and reinstall them.

comment:5 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: quentin.riffard@… added
Resolution: invalid
Status: closedreopened
Summary: freetype link error: "warning: ignoring file /opt/local/lib/libharfbuzz.dylib"freetype: ignoring file /opt/local/lib/libharfbuzz.dylib, file was built for x86_64 which is not the architecture being linked (i386): /opt/local/lib/libharfbuzz.dylib

Sorry, what I wrote previously was incorrect.

The filing of duplicate #42817 helped me realize this is not an isolated incident. I should have looked closer to realize that it is unexpected that freetype is trying to use harfbuzz at all. Harfbuzz support is new in freetype 2.5.3, and I hadn't realized that when I committed the update, so freetype does not declare a dependency on harfbuzz, so this problem occurs when you're trying to build freetype universal but harfbuzz is not installed universal.

In fact, we cannot make freetype depend on harfbuzz because harfbuzz already depends on freetype, and MacPorts cannot accommodate circular dependencies. So what we must do is force freetype not to use harfbuzz, even if it is installed.

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

Resolution: fixed
Status: reopenedclosed
Note: See TracTickets for help on using tickets.