Opened 6 years ago

Closed 6 years ago

#57081 closed defect (fixed)

fontconfig @2.13.1 uses json-c at build time if found

Reported by: mf2k (Frank Schima) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.5.99
Keywords: Cc:
Port: fontconfig

Description

I'm seeing this error trying to build fontconfig 2.13.1

:info:build ld: warning: ignoring file /opt/local/lib/libjson-c.dylib, file was built for x86_64 which is not the architecture being linked (i386): /opt/local/lib/libjson-c.dylib
:info:build Undefined symbols for architecture i386:
:info:build   "_json_object_array_get_idx", referenced from:
:info:build       _main in test_conf-test-conf.o
:info:build   "_json_object_array_length", referenced from:
:info:build       _main in test_conf-test-conf.o
:info:build   "_json_object_from_file", referenced from:
:info:build       _main in test_conf-test-conf.o
:info:build   "_json_object_get_boolean", referenced from:
:info:build       _build_pattern in test_conf-test-conf.o
:info:build   "_json_object_get_double", referenced from:
:info:build       _build_pattern in test_conf-test-conf.o
:info:build   "_json_object_get_int", referenced from:
:info:build       _build_pattern in test_conf-test-conf.o
:info:build   "_json_object_get_object", referenced from:
:info:build       _main in test_conf-test-conf.o
:info:build       _build_pattern in test_conf-test-conf.o
:info:build   "_json_object_get_string", referenced from:
:info:build       _main in test_conf-test-conf.o
:info:build       _build_pattern in test_conf-test-conf.o
:info:build   "_json_object_get_type", referenced from:
:info:build       _main in test_conf-test-conf.o
:info:build       _build_pattern in test_conf-test-conf.o
:info:build   "_json_object_object_get_ex", referenced from:
:info:build       _main in test_conf-test-conf.o
:info:build   "_json_object_put", referenced from:
:info:build       _main in test_conf-test-conf.o
:info:build   "_json_type_to_name", referenced from:
:info:build       _main in test_conf-test-conf.o
:info:build       _build_pattern in test_conf-test-conf.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)

Attachments (1)

main.log (552.1 KB) - added by mf2k (Frank Schima) 6 years ago.

Download all attachments as: .zip

Change History (4)

Changed 6 years ago by mf2k (Frank Schima)

Attachment: main.log added

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

Status: assignedaccepted
Summary: fontconfig +universal build errorfontconfig @2.13.1 uses json-c at build time if found

Thanks. The code that looks for json-c is new in 2.13.1. It appears to be used only for a test, and we don't have tests enabled for fontconfig, so we should disable looking for json-c. I couldn't find an obvious way to do that. I've requested upstream add this. I may have to patch the configure script until then.

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

You can work around the problem for now by using sudo port -f deactivate json-c before building fontconfig, and you can sudo port activate json-c again afterward.

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

Resolution: fixed
Status: acceptedclosed

In 238f16ce7deab2be163312896ca892944f1a8ace/macports-ports (master):

fontconfig: Do not look for json-c

It is only used for an optional test at test time. We don't have tests
enabled for this port so there's no reason to use json-c.

Using json-c might cause the build to fail, if json-c is installed for
different architecture(s) than the one(s) for which fontconfig is being
built.

Closes: #57081

Note: See TracTickets for help on using tickets.