Opened 13 years ago

Last modified 22 months ago

#33827 reopened defect

cairo: Undefined symbols _cairo_boilerplate_get_target_by_name _cairo_boilerplate_xrealloc _cairo_boilerplate_xmalloc, and links with libraries it doesn't declare dependencies on

Reported by: adamb2903 Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.0.4
Keywords: Cc: tonior@…, petr.vokac_@…, eravin@…, obartunov@…, drkp (Dan Ports), torschen@…, jowens@…
Port: cairo, cairo-devel

Description

Cairo fails to build as universal. Cleaned cairo, tried again, still nothing. Log is attached.

Attachments (4)

main.log (1.1 MB) - added by adamb2903 13 years ago.
main.2.log (16.8 KB) - added by obartunov@… 13 years ago.
cairo building log
cairo.main.log (1.2 MB) - added by macports@… 13 years ago.
main.3.log (1.1 MB) - added by torschen@… 13 years ago.

Change History (26)

Changed 13 years ago by adamb2903

Attachment: main.log added

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

Owner: changed from macports-tickets@… to ryandesign@…
Port: cairo cairo-devel added; Cairo removed
Status: newassigned
Summary: Cairo build failurecairo: Undefined symbols _cairo_boilerplate_get_target_by_name _cairo_boilerplate_xrealloc _cairo_boilerplate_xmalloc

I already know cairo will link with some libraries I didn't expect it to use. I'll fix that, then we'll see whether anything additional needs to be done for this issue.

Version 0, edited 13 years ago by ryandesign (Ryan Carsten Schmidt) (next)

comment:2 Changed 13 years ago by tonior@…

Cc: tonior@… added

Cc Me!

comment:3 Changed 13 years ago by petr.vokac_@…

Cc: petr.vokac_@… added

Cc Me!

comment:4 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: eravin@… added
Summary: cairo: Undefined symbols _cairo_boilerplate_get_target_by_name _cairo_boilerplate_xrealloc _cairo_boilerplate_xmalloccairo tries to link with libraries it doesn't declare dependencies on

Has duplicate #33856.

comment:5 in reply to:  description Changed 13 years ago by obartunov@…

Replying to adam.bartley@…:

Cairo fails to build as universal. Cleaned cairo, tried again, still nothing. Log is attached.

I got the same problem, when did 'port upgrade outdated' two days ago on my mba running Lion. Any hope to resolve this problem ?

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

Cc: obartunov@… added

You can work around the problem by deactivating the implicated ports for the duration of the cairo build. For example, if the cairo log says "ignoring file /opt/local/lib/libspectre.dylib, file was built for unsupported file format which is not the architecture being linked", then you can use "port provides /opt/local/lib/libspectre.dylib" to discover that this library was provided by the "libspectre" port. You can then "sudo port -f deactivate libspectre", "sudo port clean cairo" and try again. You may have to do this for multiple implicated ports. Once you get cairo installed, you can "sudo port activate libspectre" again (and similarly for other ports you deactivated) if desired.

Changed 13 years ago by obartunov@…

Attachment: main.2.log added

cairo building log

comment:7 in reply to:  6 Changed 13 years ago by obartunov@…

Replying to ryandesign@…:

You can work around the problem by deactivating the implicated ports for the duration of the cairo build. For example, if the cairo log says "ignoring file /opt/local/lib/libspectre.dylib, file was built for unsupported file format which is not the architecture being linked", then you can use "port provides /opt/local/lib/libspectre.dylib" to discover that this library was provided by the "libspectre" port. You can then "sudo port -f deactivate libspectre", "sudo port clean cairo" and try again. You may have to do this for multiple implicated ports. Once you get cairo installed, you can "sudo port activate libspectre" again (and similarly for other ports you deactivated) if desired.

I don't understand this. I tried to install ufraw and port requires upgrade cairo. Buildig cairo fails with

clang: warning: argument unused during compilation: '-Wp,-D_FORTIFY_SOURCE=2'
Undefined symbols for architecture x86_64:
  "_cairo_boilerplate_get_target_by_name", referenced from:
      _main in cairo_sphinx-sphinx.o
  "_cairo_boilerplate_xrealloc", referenced from:
      _main in cairo_sphinx-sphinx.o
      _recorder in lto.o
  "_cairo_boilerplate_xmalloc", referenced from:
      _main in cairo_sphinx-sphinx.o
      __surface_create in lto.o
      __context_create in lto.o
      _get_surface_size in lto.o
      _recorder in lto.o
ld: symbol(s) not found for architecture x86_64

I attached main.log. What should i deactivate ?

comment:8 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

obartunov, that doesn't look like the same error being discussed in this ticket.

comment:9 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Actually never mind, I see it is the same error adam.bartley reported. Well I don't know if it's related to cairo using undeclared dependencies. We may have multiple unrelated problems occurring.

comment:10 Changed 13 years ago by drkp (Dan Ports)

Cc: dports@… added

Cc Me!

comment:11 Changed 13 years ago by torschen@…

Cc: torschen@… added

Cc Me!

comment:12 Changed 13 years ago by macports@…

Ran into this when trying to upgrade all. Goes until:

:info:build any2ppm.c:72:26: error: librsvg/rsvg.h: No such file or directory
:info:build any2ppm.c:73:32: error: librsvg/rsvg-cairo.h: No such file or directory

Then it is nothing but errors. Attaching log.

Changed 13 years ago by macports@…

Attachment: cairo.main.log added

comment:13 Changed 13 years ago by macports@…

Temporarily deactivating librsvg allowed cairo to build successfully, as suggested.

comment:14 Changed 13 years ago by jowens@…

Cc: jowens@… added

Cc Me!

comment:15 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

  • r91883: prevent use of ghostscript

comment:16 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed
  • r91886: prevent use of librsvg, libspectre, poppler

comment:17 in reply to:  16 Changed 13 years ago by torschen@…

Resolution: fixed
Status: closedreopened

sorry, but these changes did not solve the problem for me. I did a port selfupdate, port clean cairo, port install cairo and still get the same error as before:

:info:build Undefined symbols for architecture x86_64:
:info:build   "_cairo_boilerplate_get_target_by_name", referenced from:
:info:build       _main in cairo_sphinx-sphinx.o
:info:build   "_cairo_boilerplate_xrealloc", referenced from:
:info:build       _main in cairo_sphinx-sphinx.o
:info:build       _recorder in lto.o
:info:build   "_cairo_boilerplate_xmalloc", referenced from:
:info:build       _main in cairo_sphinx-sphinx.o
:info:build       __surface_create in lto.o
:info:build       __context_create in lto.o
:info:build       _get_surface_size in lto.o
:info:build       _recorder in lto.o
:info:build ld: symbol(s) not found for architecture x86_64
:info:build clang: error: linker command failed with exit code 1 (use -v to see invocation)

Log is attached.

Changed 13 years ago by torschen@…

Attachment: main.3.log added

comment:18 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Summary: cairo tries to link with libraries it doesn't declare dependencies oncairo: Undefined symbols _cairo_boilerplate_get_target_by_name _cairo_boilerplate_xrealloc _cairo_boilerplate_xmalloc, and links with libraries it doesn't declare dependencies on

Ok, then I apologize for putting the unrelated problem "cairo links with libraries it doesn't declare dependencies on" into this ticket; it should have been its own ticket.

I'll now have to ask the cairo developers about this undefined boilerplate symbols problem.

comment:19 in reply to:  18 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to ryandesign@…:

I'll now have to ask the cairo developers about this undefined boilerplate symbols problem.

Asked. As a workaround, I suggest you try using a different compiler.

the unrelated problem "cairo links with libraries it doesn't declare dependencies on" into this ticket [...] should have been its own ticket.

For the record, I asked about this on the cairo mailing list too. If a better solution than the patch I implemented emerges, we can still update the port.

comment:20 Changed 13 years ago by torschen@…

great, that worked. Using

sudo port install cairo configure.compiler=llvm-gcc-4.2

under Mac OS Lion solved the problem for me. Thank you very much.

comment:21 Changed 12 years ago by jmroot (Joshua Root)

Have you checked if it just needs gnu89 inline semantics?

comment:22 Changed 5 years ago by jmroot (Joshua Root)

This ticket seems to be about multiple issues, so it's hard to tell if it's resolved. Building cairo universal doesn't seem to be a problem any more at least.

Note: See TracTickets for help on using tickets.