Bug 105075 - Generation of glib API documentation fails with gtk-doc 1.27
Summary: Generation of glib API documentation fails with gtk-doc 1.27
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: glib frontend (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-13 12:30 UTC by Jan Palus
Modified: 2018-02-18 22:05 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
simple patch to fix build with gtk-doc 1.27 (841 bytes, patch)
2018-02-13 23:29 UTC, Jan Palus
Details | Splinter Review

Description Jan Palus 2018-02-13 12:30:33 UTC
The error is:

>WARNING:root:Running scanner failed: [Errno 2] No such file or directory, command: LD_LIBRARY_PATH=/mnt/data-fast/jan/rpm/BUILD/poppler-0.62.0/build/glib ./poppler-scan
>Traceback (most recent call last):
>  File "../../../make-glib-api-docs", line 66, in <module>
>    gtkdoc.generate(not args.skip_html)
>  File "/mnt/data-fast/jan/rpm/BUILD/poppler-0.62.0/gtkdoc.py", line 143, in generate
>    self._run_gtkdoc_scangobj()
>  File "/mnt/data-fast/jan/rpm/BUILD/poppler-0.62.0/gtkdoc.py", line 338, in _run_gtkdoc_scangobj
>    env=env, cwd=self.output_dir)
>  File "/mnt/data-fast/jan/rpm/BUILD/poppler-0.62.0/gtkdoc.py", line 209, in _run_command
>    % (args[0], process.returncode))
> Exception: gtkdoc-scangobj produced a non-zero return code 1
> make[2]: *** [glib/reference/CMakeFiles/glib-docs.dir/build.make:64: glib/reference/glib-docs-build.stamp] Error 1

See similar report for webkit:

https://bugzilla.gnome.org/show_bug.cgi?id=789800

same issue reported by debian:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=887525

Perhaps it's better to use native gtk-doc support in CMake? (https://developer.gnome.org/gtk-doc-manual/stable/cmake.html.en)
Comment 1 Albert Astals Cid 2018-02-13 13:12:45 UTC
Native cmake gtk-doc support was ultra broken last time we had a look. But if you want to give it another try, it would be great.
Comment 2 Jan Palus 2018-02-13 23:29:30 UTC
Created attachment 137347 [details] [review]
simple patch to fix build with gtk-doc 1.27

Maybe next time. For now all I can offer is simple patch to fix current approach. Tested both with gtk-doc 1.25 and 1.27.
Comment 3 Albert Astals Cid 2018-02-14 23:44:52 UTC
Carlos what do you think?

I need this since i'm now also using gtk-doc 1.27 and without it can't really do a release :D
Comment 4 Albert Astals Cid 2018-02-18 21:02:31 UTC
Doesn't work for me

I had to use

@@ -319,9 +327,9 @@ class GTKDoc(object):
             ldflags = ' "-L%s" %s ' % (self.library_path, additional_ldflags) + ldflags
             current_ld_library_path = env.get('LD_LIBRARY_PATH')
             if current_ld_library_path:
-                env['RUN'] = 'LD_LIBRARY_PATH="%s:%s" ' % (self.library_path, current_ld_library_path)
+                env['LD_LIBRARY_PATH'] = '%s:%s' % (self.library_path, current_ld_library_path)
             else:
-                env['RUN'] = 'LD_LIBRARY_PATH="%s" ' % self.library_path
+                env['LD_LIBRARY_PATH'] = self.library_path
 
         if ldflags:
             env['LDFLAGS'] = '%s %s' % (ldflags, env.get('LDFLAGS', ''))

Does this work for you too?
Comment 5 Jan Palus 2018-02-18 21:23:12 UTC
Confirmed it works fine.
Comment 6 Albert Astals Cid 2018-02-18 22:05:11 UTC
Pushed


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.