#20727 closed defect (invalid)
fontconfig +universal installs broken fontconfig.pc if libiconv is not universal
Reported by: | asb@… | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.7.1 |
Keywords: | fontconfig pkg-config universal | Cc: | |
Port: | fontconfig |
Description
I was unsure whether to file this bug against fontconfig or cairo. fontconfig will install successfully with +universal +no_x11 +quartz but I fail to build cairo 1.8.8 (with identical error as in #16057). I noticed that pkg-config --list-all fails when reading fontconfig.pc, complaining: Libs.private field occurs twice in '/Users/asb/macports/lib/pkgconfig/fontconfig.pc'
This file contains:
prefix=/Users/asb/macports exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include Name: Fontconfig Description: Font configuration and customization library Version: 2.7.1 Libs: -L${libdir} -lfontconfig #if (defined(__ppc__) || defined(__ppc64__)) Libs.private: -lexpat -L/Users/asb/macports/lib -lfreetype -lz -Wl,-framework,CoreServices -Wl,-framework,ApplicationServices #else /* ! __ppc__ && ! __ppc64__ */ Libs.private: -lexpat -L/Users/asb/macports/lib -lfreetype -lz -Wl,-framework,CoreServices -Wl,-framework,ApplicationServices -liconv #endif /* __ppc__ || __ppc64__ */ Cflags: -I${includedir}
My cairo build will complete successfully if I edit the above file to include only the non-ppc case, but I haven't yet determined whether linking to iconv actually breaks anything for ppc.
This is taking place on a 10.4.11 Server machine.
Change History (6)
comment:1 Changed 15 years ago by asb@…
Cc: | asb@… added |
---|
comment:2 Changed 15 years ago by blb@…
Owner: | changed from macports-tickets@… to ryandesign@… |
---|
comment:3 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | asb@… removed |
---|---|
Status: | new → assigned |
Summary: | fontconfig 2.7.1 appears to install broken fontconfig.pc → fontconfig +universal installs broken fontconfig.pc if libiconv is not universal |
I can reproduce this problem on my Intel Mac running 10.4.11 if I build libiconv non-universal and then build fontconfig universal (for i386 ppc) -- that is, with this set of ports installed:
$ port installed libiconv fontconfig The following ports are currently installed: fontconfig @2.7.1_1+macosx+universal (active) libiconv @1.13_0 (active)
If this matches your situation, then you must rebuild libiconv so it is universal, then rebuild fontconfig.
$ sudo port -nf upgrade libiconv +universal $ sudo port -nf upgrade fontconfig
Does that help?
When installing any port with the universal variant, you must ensure that any of its dependencies that are already installed are installed with the universal variant as well. MacPorts does not detect if this is not the case, though it would be nice if it did.
comment:4 Changed 15 years ago by asb@…
You're right, it was user error. I do of course understand that all dependencies must be built +universal but hadn't recognise libiconv was not. I had installed vim before adding +universal to my variants.conf. Thanks for the help. cairo will now install happily.
comment:5 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → invalid |
---|---|
Status: | assigned → closed |
Yes, I'm surprised the fontconfig install completed and didn't error out. But I'm glad you got it working now. I'll close this as "invalid" because there wasn't a bug in fontconfig, but, as I mentioned, I filed #20728 to have MacPorts base detect and print a message about this situation.
comment:6 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)
In r58380 I added a check to fontconfig to ensure each dependency has the right architectures; this should prevent this problem in the future by providing a clear error message explaining what the user must do to fix it.
Cc Me!