Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#35385 closed defect (fixed)

ipe-tools @20110916 build failure of pdftoipe due to API change in poppler >= 0.20

Reported by: maehne (Torsten Maehne) Owned by: dbevans (David B. Evans)
Priority: Normal Milestone:
Component: ports Version: 2.1.2
Keywords: haspatch Cc: m.thon@…
Port: ipe-tools

Description

The source file xmloutputdev.cpp of pdtoipe fails to compile due to an API changer in the poppler library, which is currently @0.20.2. Here's the output of the port command when trying to install ipe-tools:

$ port -v install ipe-tools
...
--->  Extracting ipe-tools
--->  Extracting svgtoipe-20100608.tar.gz
--->  Extracting pdftoipe-20110916-src.tar.gz
--->  Extracting figtoipe-20091205.tar.gz
--->  Extracting ipe5toxml-20051114.tar.gz
--->  Applying patches to ipe-tools
--->  Applying patch-pdftoipe-20110916-src-xmloutputdev.cpp.diff
patching file pdftoipe-20110916-src/xmloutputdev.cpp
--->  Configuring ipe-tools
--->  Building ipe-tools
/usr/bin/clang++ -O2 -Wall -W -o figtoipe figtoipe.cpp -arch x86_64 -lz
/usr/bin/clang -I/opt/local/include -O2 -arch x86_64 -I/opt/local/include  -c -o ipe5toxml.o ipe5toxml.c
/usr/bin/clang -arch x86_64 -o ipe5toxml ipe5toxml.o -lm
/usr/bin/clang++ -O2 -arch x86_64 -Wno-write-strings -I/opt/local/include -I/opt/local/include/poppler     -c -o parseargs.o parseargs.cc
/usr/bin/clang++ -O2 -arch x86_64 -Wno-write-strings -I/opt/local/include -I/opt/local/include/poppler     -c -o xmloutputdev.o xmloutputdev.cpp
xmloutputdev.cpp:33:5: error: no matching function for call to 'error'
    error(-1, "Couldn't open output file '%s'", fileName);
    ^~~~~
/opt/local/include/poppler/Error.h:54:19: note: candidate function not viable: no known conversion from 'int' to 'ErrorCategory' for 1st argument; 
extern void CDECL error(ErrorCategory category, int pos, const char *msg, ...);
                  ^
1 error generated.
make: *** [xmloutputdev.o] Error 1
Command failed: cd /opt/local/var/macports/build/_Users_maehne_Build_MacPorts_ports_graphics_ipe-tools/ipe-tools/work/pdftoipe-20110916-src && CPPFLAGS+='-I/opt/local/include' CFLAGS+='-I/opt/local/include -O2 -arch x86_64' CXXFLAGS+='-O2 -arch x86_64' LDFLAGS+='-arch x86_64' CC=/usr/bin/clang CXX=/usr/bin/clang++ CC=/usr/bin/clang++ /usr/bin/make all
Exit code: 2
...

The issue has been already reported upstream (issue 112) with an analysis and a proposed patch. I added the patch to the ipe-tools port.

Attachments (2)

ipe-tools-port.patch (1.6 KB) - added by maehne (Torsten Maehne) 12 years ago.
Patch for the ipe-tools port
patch-ipe-tools-Portfile.diff (1.5 KB) - added by dbevans (David B. Evans) 12 years ago.
Alternate proposed patch

Download all attachments as: .zip

Change History (7)

Changed 12 years ago by maehne (Torsten Maehne)

Attachment: ipe-tools-port.patch added

Patch for the ipe-tools port

comment:1 Changed 12 years ago by m.thon@…

Thanks! Can someone with commit rights please commit this and close this ticket?

@Torsten.Maehne: I read this on the ipe mailing list, too, and was hoping that someone would make a macports patch :-). Do you perhaps want to become the maintainer of the ipe ports? Or should we put openmaintainer? There is no particular reason that I am currently the maintainer, I was just the first to write a macports portfile for ipe.

comment:2 Changed 12 years ago by maehne (Torsten Maehne)

@m.thon: Thanks for reviewing my patch. For the moment, I would prefer you to stay in the maintainer list. However, feel free to add me to the list as a second maintainer of ipe and ipe-tools. The reason is that I'm not very familiar with Qt4 and its particularities regarding building. You may also add openmaintainer to speed up the integration of minor fixes.

comment:3 Changed 12 years ago by dbevans (David B. Evans)

Owner: changed from macports-tickets@… to devans@…
Status: newassigned

Here is a slightly different patch that uses the new poppler error API instead of fprintf. In addition I have added the maintainer changes discussed. Let me know which patch you prefer and I'll commit those changes.

Changed 12 years ago by dbevans (David B. Evans)

Alternate proposed patch

comment:4 Changed 12 years ago by dbevans (David B. Evans)

Resolution: fixed
Status: assignedclosed

After re-reading the previous comments and in the spirit of moving things along have committed the first patch (to follow upstream practice) with the minor modification of maintainers as discussed and revision to ensure rebuild against latest poppler 0.20.4.

Please let me know if there are any other changes you would like.

Committed in r97771.

comment:5 Changed 12 years ago by maehne (Torsten Maehne)

Thank you for having commited the upstream patch to ipe-tools and for adding me to the maintainer list of this port! For the moment, there's no further action needed.

PS: Sorry for my late reply. I've been traveling.

Note: See TracTickets for help on using tickets.