qpdfview broken by libsynctex API/ABI change

Bug #1769214 reported by Genevieve Mendoza
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qpdfview
Fix Released
High
Adam Reichold

Bug Description

The 2018 version of libsynctex changed its public API/ABI. When qpdfview is run with the updated libsynctex installed, it fails with "symbol lookup error: undefined symbol: synctex_next_result."

The arch linux bug report contains links to relevant bug reports (debian, libsynctex, zathura): https://bugs.archlinux.org/index.php?do=details&task_id=58403.

description: updated
Changed in qpdfview:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Adam Reichold (adamreichold)
milestone: none → 0.4.18
Revision history for this message
Adam Reichold (adamreichold) wrote :

Hello Genevieve,

thank you for taking the time to report this! I am currently running OpenSUSE Tumbleweed so I have not yet experienced this myself, but I will try to setup a development environment where I can. I guess Debian unstable would be a good candidate?

Best regards,
Adam

Revision history for this message
Genevieve Mendoza (aenda) wrote :

Hi Adam - as I understand it, Debian unstable has the new libsynctex and includes the header files missing on Arch, and so would work. I suppose a good test would be if the zathura development branch correctly compiles on that system, since the reason it fails for me on Arch is the missing file. Thanks for taking the time to look into this!

Revision history for this message
Adam Reichold (adamreichold) wrote :

Hello again,

I think I have the necessary changes in place and successfully built on Debian unstable against SyncTeX parser 1.21. Please give qpdfview's trunk a try when fixed packages land in Arch. Thank you!

Best regards,
Adam

Changed in qpdfview:
status: Triaged → Fix Committed
Revision history for this message
Genevieve Mendoza (aenda) wrote :

Will do! As of right now, I can successfully build, install, and run with the updated libsynctex package, which is great - thank you! Synctex seems to be disabled no matter what (regardless of what I pass to qmake). This is probably a problem with Arch's packaging, and I will check again once there is an update on their bug tracker.

Revision history for this message
Adam Reichold (adamreichold) wrote : Re: [Bug 1769214] Re: qpdfview broken by libsynctex API/ABI change

Hello again,

Am 06.05.2018 um 03:32 schrieb Genevieve Mendoza:
> Will do! As of right now, I can successfully build, install, and run
> with the updated libsynctex package, which is great - thank you! Synctex
> seems to be disabled no matter what (regardless of what I pass to
> qmake). This is probably a problem with Arch's packaging, and I will
> check again once there is an update on their bug tracker.

That sounds like something is broken as it should never be disabled,
except if you pass "CONFIG+=without_synctex". It should either use the
system-wide version if pkg-config knows about (try pkg-config
--modversion synctex) or it will use a source copy that is included with
qpdfview (which used to be the recommended way of doing this).

How did you test it? By passing a source reference via the command line
or by trying to open an editor using the document context menu or the
SyncTeX modifier? You might need to either configure the editor or the
modifier via the settings dialog. (The context menu entry should be
visible whenever SyncTeX could be parsed successfully for a document.)

Best regards, Adam.

Revision history for this message
Adam Reichold (adamreichold) wrote :

Hello again,

Am 06.05.2018 um 03:32 schrieb Genevieve Mendoza:
> Will do! As of right now, I can successfully build, install, and run
> with the updated libsynctex package, which is great - thank you! Synctex
> seems to be disabled no matter what (regardless of what I pass to
> qmake). This is probably a problem with Arch's packaging, and I will
> check again once there is an update on their bug tracker.

so at least here, everything seems to work as expected, i.e. if I open
document with associated SyncTeX data, the first entry if I open a
context menu anywhere on a page is the "Edit ..." one which calls up my
source editor. This works both without and with libsynctex development
files installed, i.e. with the internal our the external version of the
parser.

Best regards,
Adam

Revision history for this message
Genevieve Mendoza (aenda) wrote :
Download full text (4.5 KiB)

Hi! Arch Linux now has the updated texlive files (new libsynctex and texlive-bin 2018.47465-2). However, when I try to build qpdfview-bzr from the AUR, I get the following error:

```
g++ -c -pipe -flto -O2 -march=x86-64 -mtune=generic -O2 -pipe
-fstack-protector-strong -fno-plt -Wall -W -D_REENTRANT -fPIC
-DAPPLICATION_VERSION=\"0.4.17.99\" -DWITH_SVG -DWITH_SQL -DWITH_DBUS
-DPLUGIN_INSTALL_PATH=\"/usr/lib/qpdfview\" -DWITH_IMAGE
-DIMAGE_PLUGIN_NAME=\"libqpdfview_image.so\" -DWITH_CUPS
-DCUPS_VERSION=\"2.2.7\" -DWITH_SYNCTEX -DWITH_SIGNALS
-DDATA_INSTALL_PATH=\"/usr/share/qpdfview\" -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB
-DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CONCURRENT_LIB -DQT_SQL_LIB
-DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iicons -isystem /usr/include/synctex
-isystem /usr/include/qt -isystem /usr/include/qt/QtPrintSupport
-isystem /usr/include/qt/QtSvg -isystem /usr/include/qt/QtWidgets
-isystem /usr/include/qt/QtGui -isystem /usr/include/qt/QtConcurrent
-isystem /usr/include/qt/QtSql -isystem /usr/include/qt/QtDBus
-isystem /usr/include/qt/QtCore -Imoc -isystem /usr/include/libdrm
-I/usr/lib/qt/mkspecs/linux-g++ -o objects/fontsdialog.o sources/fontsdialog.cpp
sources/documentview.cpp:61:27: error: conflicting declaration ‘typedef struct synctex_scanner_t synctex_scanner_p’
 typedef synctex_scanner_t synctex_scanner_p;
                           ^~~~~~~~~~~~~~~~~
In file included from sources/documentview.cpp:57:
/usr/include/synctex/synctex_parser.h:69:33: note: previous declaration as ‘typedef synctex_scanner_s* synctex_scanner_p’
     typedef synctex_scanner_s * synctex_scanner_p;
                                 ^~~~~~~~~~~~~~~~~
sources/documentview.cpp:62:24: error: conflicting declaration ‘typedef struct synctex_node_t synctex_node_p’
 typedef synctex_node_t synctex_node_p;
                        ^~~~~~~~~~~~~~
In file included from sources/documentview.cpp:57:
/usr/include/synctex/synctex_parser.h:145:30: note: previous declaration as ‘typedef synctex_node_s* synctex_node_p’
     typedef synctex_node_s * synctex_node_p;
                              ^~~~~~~~~~~~~~
sources/documentview.cpp: In function ‘qpdfview::DocumentView::SourceLink {anonymous}::scanForSourceLink(const QString&, int, QPointF)’:
sources/documentview.cpp:64:46: error: ‘synctex_next_result’ was not declared in this scope
 #define synctex_scanner_next_result(scanner) synctex_next_result(scanner)
                                              ^~~~~~~~~~~~~~~~~~~
sources/documentview.cpp:261:39: note: in expansion of macro ‘synctex_scanner_next_result’
             for(synctex_node_p node = synctex_scanner_next_result(scanner); node != 0; node = synctex_scanner_next_result(scanner))
                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~
g++ -c -pipe -flto -O2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -Wall -W -D_REENTRANT -fPIC -DAPPLICATION_VERSION=\"0.4.17.99\" -DWITH_SVG -DWITH_SQL -DWITH_DBUS -DPLUGIN_INSTALL_PATH=\"/usr/lib/qpdfview\" -DWITH_IMAGE -DIMAGE_PLUGIN_NAME=\"libqpdfview_image.so\" -DWITH_CUPS -DCUPS_VERSION=\"2.2.7\" -DWITH_SYNCTEX -DWITH_SIGNALS -DDATA_INSTALL_PATH=\"/usr/share/qpdfview\" -DQT_NO_DEBUG -DQ...

Read more...

Revision history for this message
Adam Reichold (adamreichold) wrote :

Hello again,

can you check what pkg-config --modversion synctex yields? Also make sure to start with a clean rebuild so that qmake properly sets the necessary defines.

Best regards,
Adam.

Revision history for this message
Genevieve Mendoza (aenda) wrote :

Sure - pkg-config returns 1.21.0, and I get the same on a clean build. Let me know if I can provide any other information or if there is any debugging I should try.

Revision history for this message
Adam Reichold (adamreichold) wrote :

Hhhmmm, on Debian and OpenSUSE, it returns 2.0.0 to indicate the API change... I guess I will check for 1.19 instead. Can you give trunk revision 2078 a try?

Revision history for this message
Genevieve Mendoza (aenda) wrote :

It works perfectly! I guess that's just an Arch-specific quirk. Thank you very much for all the help and work on fixing this!

Revision history for this message
Adam Reichold (adamreichold) wrote :

My guess is that it is the other way around: Arch just ships upstream whereas Debian and OpenSUSE manually bumped the pkg-config module version to indicate the incompatible API. I am wondering how they will reconcile this in the future? Hopefully SyncTeX will just bump from 1.21 to 2.0.

Changed in qpdfview:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.