Opened 11 years ago

Closed 11 years ago

#40086 closed defect (invalid)

dblatex @0.3.4 - compile failure in Poppler

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

Description

I am trying to install dblatex on OS X 10.8.4 with the following command:

sudo port -v install dblatex +no_x11

I have the command-line tools from XCode 4.6.3 installed.

I get the following error trying to install Poppler (seemingly a dependency):

libtool: link: ( cd ".libs" && rm -f "libpoppler-glib.la" && ln -s "../libpoppler-glib.la" "libpoppler-glib.la" )
/opt/local/bin/g-ir-scanner  --add-include-path=. --warn-all --namespace=Poppler --nsversion=0.18 --libtool="/bin/sh ../libtool"  --include=GObject-2.0 --include=Gio-2.0 --include=cairo-1.0 --pkg-export=poppler-glib  --library=libpoppler-glib.la --c-include poppler.h --cflags-begin -DG_LOG_DOMAIN=\"Poppler\" -I.. -I../poppler -D_REENTRANT -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/cairo -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include/libpng15   -I/opt/local/include/freetype2 -I/opt/local/include   -DG_DISABLE_DEPRECATED -DG_DISABLE_SINGLE_INCLUDES -I.. --cflags-end  poppler-enums.c poppler-enums.h poppler-action.cc poppler-date.cc poppler-document.cc poppler-page.cc poppler-attachment.cc poppler-form-field.cc poppler-annot.cc poppler-layer.cc poppler-media.cc poppler-movie.cc poppler-cached-file-loader.cc poppler-cached-file-loader.h poppler-input-stream.cc poppler.cc poppler-action.h poppler-date.h poppler-document.h poppler-page.h poppler-attachment.h poppler-form-field.h poppler-annot.h poppler-layer.h poppler-media.h poppler-movie.h poppler.h poppler-features.h libpoppler-glib.la --output Poppler-0.18.gir
Traceback (most recent call last):
  File "/opt/local/bin/g-ir-scanner", line 44, in <module>
    from giscanner.scannermain import scanner_main
  File "/opt/local/lib/gobject-introspection/giscanner/scannermain.py", line 34, in <module>
    from giscanner.dumper import compile_introspection_binary
  File "/opt/local/lib/gobject-introspection/giscanner/dumper.py", line 28, in <module>
    from .gdumpparser import IntrospectionBinary
  File "/opt/local/lib/gobject-introspection/giscanner/gdumpparser.py", line 31, in <module>
    from .transformer import TransformerException
  File "/opt/local/lib/gobject-introspection/giscanner/transformer.py", line 27, in <module>
    from .girparser import GIRParser
  File "/opt/local/lib/gobject-introspection/giscanner/girparser.py", line 26, in <module>
    from .girwriter import COMPATIBLE_GIR_VERSION
  File "/opt/local/lib/gobject-introspection/giscanner/girwriter.py", line 25, in <module>
    from .xmlwriter import XMLWriter
  File "/opt/local/lib/gobject-introspection/giscanner/xmlwriter.py", line 93, in <module>
    from giscanner._giscanner import collect_attributes
ImportError: dlopen(/opt/local/lib/gobject-introspection/giscanner/_giscanner.so, 2): Library not loaded: /opt/local/lib/libgio-2.0.0.dylib
  Referenced from: /opt/local/lib/gobject-introspection/giscanner/_giscanner.so
  Reason: Incompatible library version: _giscanner.so requires version 3601.0.0 or later, but libgio-2.0.0.dylib provides version 3201.0.0
make[4]: *** [Poppler-0.18.gir] Error 1
make[4]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_poppler/poppler/work/poppler-0.24.0/glib'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_poppler/poppler/work/poppler-0.24.0/glib'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_poppler/poppler/work/poppler-0.24.0/glib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_poppler/poppler/work/poppler-0.24.0'
make: *** [all] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_poppler/poppler/work/poppler-0.24.0'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_poppler/poppler/work/poppler-0.24.0" && /usr/bin/make -j5 -w all CC="/usr/bin/clang -arch x86_64" 
Exit code: 2
Error: org.macports.build for port poppler returned: command execution failed
Warning: targets not executed for poppler: org.macports.activate org.macports.build org.macports.destroot org.macports.install
Error: Failed to install poppler
Please see the log file for port poppler for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_poppler/poppler/main.log
Error: The following dependencies were not installed: texlive-latex-extra texlive-bin poppler t1lib texlive-common texlive-latex-recommended pgf texlive-basic texlive-latex texlive-pictures texlive-math-extra texlive-fonts-recommended
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port dblatex failed

Change History (8)

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

Cc: ryandesign@… added
Keywords: dblatex poppler removed

Replying to duboisj@…:

I am trying to install dblatex on OS X 10.8.4 with the following command:

sudo port -v install dblatex +no_x11

Note that the dblatex port does not have a no_x11 variant so specifying "+no_x11" does nothing for dblatex. Since variants are passed to dependencies, it might do something for them, but note that the "no_" variant naming prefix is deprecated since some years already. So if you want to disable X11 support, the modern way to do that is by specifying "-x11". Unfortunately not all ports have been updated to the modern method yet so specifying both "-x11" and "+no_x11" is still a good idea. If you want this (or another variant) generally, you probably want to specify it in your variants.conf file.

ImportError: dlopen(/opt/local/lib/gobject-introspection/giscanner/_giscanner.so, 2): Library not loaded: /opt/local/lib/libgio-2.0.0.dylib
  Referenced from: /opt/local/lib/gobject-introspection/giscanner/_giscanner.so
  Reason: Incompatible library version: _giscanner.so requires version 3601.0.0 or later, but libgio-2.0.0.dylib provides version 3201.0.0

This is the problem. Your gio library is an older version than the one MacPorts should be providing. This should never have happened.

What's the output of this:

port provides /opt/local/lib/libgio-2.0.0.dylib

It should say it's provided by glib2. What's the output of this:

port -v installed glib2

If your ports are up-to-date, it should say glib2 @2.36.4 is installed. What's the output of this:

otool -L /opt/local/lib/libgio-2.0.0.dylib

It should show what library version number libgio is, which if everything were installed properly would be 3601.4.0 but we already know something is wrong here.

comment:2 Changed 11 years ago by duboisj@…

Hi. Thanks for the note about disabling x11. The output of the commands you wanted is below. In particular:

port provides /opt/local/lib/libgio-2.0.0.dylib

gives this:

/opt/local/lib/libgio-2.0.0.dylib is provided by: glib2

... and:

port -v installed glib2

gives this:

The following ports are currently installed:
  glib2 @2.30.2_2 platform='darwin 11' archs='x86_64'
  glib2 @2.32.4_0 (active) platform='darwin 11' archs='x86_64'

... and lastly:

otool -L /opt/local/lib/libgio-2.0.0.dylib

gives this:

/opt/local/lib/libgio-2.0.0.dylib:
	/opt/local/lib/libgio-2.0.0.dylib (compatibility version 3201.0.0, current version 3201.4.0)
	/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 833.24.0)
	/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 153.0.0)
	/opt/local/lib/libglib-2.0.0.dylib (compatibility version 3201.0.0, current version 3201.4.0)
	/opt/local/lib/libgobject-2.0.0.dylib (compatibility version 3201.0.0, current version 3201.4.0)
	/opt/local/lib/libgthread-2.0.0.dylib (compatibility version 3201.0.0, current version 3201.4.0)
	/opt/local/lib/libffi.6.dylib (compatibility version 7.0.0, current version 7.0.0)
	/opt/local/lib/libgmodule-2.0.0.dylib (compatibility version 3201.0.0, current version 3201.4.0)
	/usr/lib/libresolv.9.dylib (compatibility version 1.0.0, current version 46.1.0)
	/opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.7)
	/opt/local/lib/libintl.8.dylib (compatibility version 10.0.0, current version 10.1.0)
	/opt/local/lib/libiconv.2.dylib (compatibility version 8.0.0, current version 8.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)
	/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 635.19.0)

Cheers.

Last edited 11 years ago by duboisj@… (previous) (diff)

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

Ok, that confirms that, although MacPorts believes it has installed glib2 @2.32.4, in fact a much earlier version is actually installed. This should not have been possible, using MacPorts alone, so I suspect some outside influence has caused this problem.

Did you install some third-party software that was itself packaged using MacPorts which overwrote some of your MacPorts files? This possibility is addressed here: ProblemHotlist#xmlwf

Or did you perhaps restore part but not all of a Time Machine backup?

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

Replying to ryandesign@…:

Ok, that confirms that, although MacPorts believes it has installed glib2 @2.32.4, in fact a much earlier version is actually installed.

Wait. You have 2.32.4. That's very old. The current version is 2.36.4. You should update your ports to the latest versions. Run:

sudo port selfupdate
sudo port selfupdate
sudo port upgrade outdated

comment:5 Changed 11 years ago by duboisj@…

I looked at the ProblemHotList section you linked to and I do not believe I have installed any of the items mentioned. It is certainly possible something else I have installed was built with MacPorts - I'm not sure how to find out, or what I might to do clean it off if that is the problem. I have not done any Time Machine backups, nor restored from any backup.

I have run the set of commands above: two selfupdates and an 'upgrade outdated'. Now that I have done that, is there something else I should do, or should I attempt the dblatex install again?

(Note: After I first posted this bug, I installed XQuartz, so I have x11 libraries in /opt/X11 from that, if that makes any difference. That was not the case when I first got the build failure.)

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

You should confirm that you now have the correct version of glib2 (2.36.4) installed (using "port -v installed glib2") and that it provides the correct library version (3601.4.0) of libgio (using "otool -L /opt/local/lib/libgio-2.0.0.dylib"). Then you should be able to clean the affected port ("sudo port clean poppler") and try again.

You may use Xquartz as your X11 application if you wish, but note that MacPorts is designed to not use its libraries; if MacPorts needs X11 libraries, it will install its own copies thereof.

comment:7 Changed 11 years ago by duboisj@…

That did it. After those commands, port -v installed glib2 confirmed that I had 2.36.4 as active, and otool confirmed the right version of libgio (3601.4.0). I subsequently cleaned with "sudo port clean poppler" and was then able to instal dblatex.

Thank you!

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

Resolution: invalid
Status: newclosed

Great! Glad it worked.

Note: See TracTickets for help on using tickets.