[okular] [Bug 492670] New: Build error with clang and musl (on Gentoo)

bugzilla_noreply at kde.org bugzilla_noreply at kde.org
Thu Sep 5 08:36:11 BST 2024


https://bugs.kde.org/show_bug.cgi?id=492670

            Bug ID: 492670
           Summary: Build error with clang and musl (on Gentoo)
    Classification: Applications
           Product: okular
           Version: 24.08.0
          Platform: Gentoo Packages
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: PDF backend
          Assignee: okular-devel at kde.org
          Reporter: vadorovsky at protonmail.com
  Target Milestone: ---

SUMMARY

Okular (both master branch and 24.08.0) fail to build with clang as compiler
and musl as system libc.

STEPS TO REPRODUCE
1. Use Gentoo with musl-llvm profile . Maybe it's reproducible also on Alpine,
but I'm not sure.
2. Build Okular either from source (git) or with `emerge -av kde-apps/okular`

OBSERVED RESULT

[  9%] Building C object
CMakeFiles/okularcore.dir/core/synctex/synctex_parser.c.o
/home/vadorovsky/src/okular/core/synctex/synctex_parser.c:1627:85: warning:
missing field 'page' initializer [-Wmissing-field-initializers]
 1627 |                                                            
synctex_data_ref_thv_max};
      |                                                                        
            ^
/home/vadorovsky/src/okular/core/synctex/synctex_parser.c:3717:12: warning:
variable 'tested_len' set but not used [-Wunused-but-set-variable]
 3717 |     size_t tested_len = 0;    /*  the number of characters at the
beginning of the_string that match */
      |            ^
/home/vadorovsky/src/okular/core/synctex/synctex_parser.c:8059:13: error: call
to undeclared function 'vasprintf'; ISO C99 and later do not support implicit
function declarations [-Wimplicit-function-declaration]
 8059 |         if (vasprintf(&buffer, format, va) < 0) {
      |             ^
/home/vadorovsky/src/okular/core/synctex/synctex_parser.c:8059:13: note: did
you mean 'vsprintf'?
/usr/include/stdio.h:116:5: note: 'vsprintf' declared here
  116 | int vsprintf(char *__restrict, const char *__restrict, __isoc_va_list);
      |     ^
2 warnings and 1 error generated.
gmake[2]: *** [CMakeFiles/okularcore.dir/build.make:581:
CMakeFiles/okularcore.dir/core/synctex/synctex_parser.c.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:731: CMakeFiles/okularcore.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2


EXPECTED RESULT
A successful build

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Gentoo Linux (musl-llvm profile)

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Okular-devel mailing list