Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • P poppler
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 664
    • Issues 664
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 46
    • Merge requests 46
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • poppler
  • poppler
  • Issues
  • #898
Closed
Open
Issue created Mar 27, 2020 by Hubert Figuiere@hubContributor

Build fail because it can't detect strtok_r

I'm try to build master on Fedora 32 beta with the following cmake command.

cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=release

I get this build error:

[  3%] Building CXX object CMakeFiles/poppler.dir/poppler/DateInfo.cc.o
In file included from /usr/include/c++/10/cstring:42,
                 from /home/hub/source/poppler/poppler/DateInfo.cc:30:
/usr/include/string.h:346:14: error: conflicting declaration of ‘char* strtok_r(char*, const char*, char**)’ with ‘C’ linkage
  346 | extern char *strtok_r (char *__restrict __s, const char *__restrict __delim,
      |              ^~~~~~~~
In file included from /home/hub/source/poppler/poppler/DateInfo.cc:26:
/home/hub/source/poppler/goo/glibc.h:34:8: note: previous declaration with ‘C++’ linkage
   34 | char * strtok_r (char *s, const char *delim, char **save_ptr);
      |        ^~~~~~~~
make[2]: *** [CMakeFiles/poppler.dir/build.make:471: CMakeFiles/poppler.dir/poppler/DateInfo.cc.o] Error 1

It seems that CMake doesn't detect strtok_r.

I have no idea where to look into CMake to further diagnose the problem.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking