Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
G
GPSTk
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 27
    • Issues 27
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 17
    • Merge Requests 17
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • SGL-UT
  • GPSTk
  • Issues
  • #33

Closed
Open
Opened Feb 03, 2017 by xaedes@xaedes

Wrong usage of mkdir in Mingw/Msys2 Build

When building the extensions on Mingw/Msys2 platform I got following error:

In file included from H:/msys64/home/xaedes/GPSTk/core/lib/FileDirProc/FileFilte                                                                                                                                                             rFrame.hpp:48:0,
                 from H:/msys64/home/xaedes/GPSTk/ext/apps/checktools/CheckFrame                                                                                                                                                             .hpp:43,
                 from H:/msys64/home/xaedes/GPSTk/ext/apps/checktools/rnwcheck.c                                                                                                                                                             pp:37:
H:/msys64/home/xaedes/GPSTk/core/lib/FileDirProc/FileUtils.hpp: In function 'int                                                                                                                                                              gpstk::FileUtils::makeDir(const string&, unsigned int)':
H:/msys64/home/xaedes/GPSTk/core/lib/FileDirProc/FileUtils.hpp:113:41: error: to                                                                                                                                                             o many arguments to function 'int mkdir(const char*)'
             mkdir(thispath.c_str(), mode);
                                         ^
In file included from H:/msys64/mingw64/x86_64-w64-mingw32/include/sys/stat.h:14                                                                                                                                                             :0,
                 from H:/msys64/home/xaedes/GPSTk/core/lib/FileDirProc/FileUtils                                                                                                                                                             .hpp:48,
                 from H:/msys64/home/xaedes/GPSTk/core/lib/FileDirProc/FileFilte                                                                                                                                                             rFrame.hpp:48,
                 from H:/msys64/home/xaedes/GPSTk/ext/apps/checktools/CheckFrame                                                                                                                                                             .hpp:43,
                 from H:/msys64/home/xaedes/GPSTk/ext/apps/checktools/rnwcheck.c                                                                                                                                                             pp:37:
H:/msys64/mingw64/x86_64-w64-mingw32/include/io.h:280:15: note: declared here
   int __cdecl mkdir (const char *) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
               ^~~~~
In file included from H:/msys64/home/xaedes/GPSTk/core/lib/FileDirProc/FileFilte                                                                                                                                                             rFrame.hpp:48:0,
                 from H:/msys64/home/xaedes/GPSTk/ext/apps/checktools/CheckFrame                                                                                                                                                             .hpp:43,
                 from H:/msys64/home/xaedes/GPSTk/ext/apps/checktools/rnwcheck.c                                                                                                                                                             pp:37:
H:/msys64/home/xaedes/GPSTk/core/lib/FileDirProc/FileUtils.hpp:116:34: error: to                                                                                                                                                             o many arguments to function 'int mkdir(const char*)'
          mkdir(path.c_str(), mode);
                                  ^
In file included from H:/msys64/mingw64/x86_64-w64-mingw32/include/sys/stat.h:14                                                                                                                                                             :0,
                 from H:/msys64/home/xaedes/GPSTk/core/lib/FileDirProc/FileUtils                                                                                                                                                             .hpp:48,
                 from H:/msys64/home/xaedes/GPSTk/core/lib/FileDirProc/FileFilte                                                                                                                                                             rFrame.hpp:48,
                 from H:/msys64/home/xaedes/GPSTk/ext/apps/checktools/CheckFrame                                                                                                                                                             .hpp:43,
                 from H:/msys64/home/xaedes/GPSTk/ext/apps/checktools/rnwcheck.c                                                                                                                                                             pp:37:
H:/msys64/mingw64/x86_64-w64-mingw32/include/io.h:280:15: note: declared here
   int __cdecl mkdir (const char *) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
               ^~~~~

The mkdir function provided by (admittedly my) mingw platform lacks the mode parameter. This part in the FileUtils.hpp file is conditionally compiled. When compiling in Visual Studio (defined(_MSC_VER)==true) another function_mkdir without the mode parameter is called. In Mingw the function is called mkdir.

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: sgl-ut/GPSTk#33