Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to Build on windows using CMAKE and MinGW(32) #179

Closed
datNurd opened this issue Mar 8, 2018 · 3 comments
Closed

Unable to Build on windows using CMAKE and MinGW(32) #179

datNurd opened this issue Mar 8, 2018 · 3 comments

Comments

@datNurd
Copy link

datNurd commented Mar 8, 2018

I've run the following command to build pkgconf on windows
cmake .. -G "MinGW Makefiles" -- The C compiler identification is GNU 6.3.0 -- Check for working C compiler: C:/MinGW/bin/gcc.exe -- Check for working C compiler: C:/MinGW/bin/gcc.exe -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Looking for include file sys/stat.h -- Looking for include file sys/stat.h - found -- Looking for strlcpy -- Looking for strlcpy - not found -- Looking for strlcat -- Looking for strlcat - not found -- Looking for strndup -- Looking for strndup - not found -- Looking for cygwin_conv_path -- Looking for cygwin_conv_path - not found -- Configuring done -- Generating done -- Build files have been written to: C:/Users/pnikh/Downloads/pkgconf-master/build

After creating the make files Ive run mingw32-make this is the error I get
Scanning dependencies of target libpkgconf [ 5%] Building C object libpkgconf/CMakeFiles/libpkgconf.dir/argvsplit.c.obj gcc.exe: error: /WX: No such file or directory gcc.exe: error: /wd4996: No such file or directory libpkgconf\CMakeFiles\libpkgconf.dir\build.make:62: recipe for target 'libpkgconf/CMakeFiles/libpkgconf.dir/argvsplit.c.obj' failed mingw32-make[3]: *** [libpkgconf/CMakeFiles/libpkgconf.dir/argvsplit.c.obj] Error 1 CMakeFiles\Makefile2:121: recipe for target 'libpkgconf/CMakeFiles/libpkgconf.dir/all' failed mingw32-make[2]: *** [libpkgconf/CMakeFiles/libpkgconf.dir/all] Error 2 Makefile:139: recipe for target 'all' failed mingw32-make[1]: *** [all] Error 2

looks like there is some problem 'argvsplit.c' file. I am using code from master branch.

@kaniini
Copy link
Member

kaniini commented Mar 13, 2018

i believe the issue is that CMake assumes you're using MSVC on Windows. you might try to use the ./configure script under MSYS in the meantime.

@tonytheodore
Copy link
Contributor

It's likely just this line https://github.com/pkgconf/pkgconf/blob/master/CMakeLists.txt#L60 that needs to be wrapped in a if (MSVC) block.

@datNurd
Copy link
Author

datNurd commented Mar 13, 2018

Yeah upon taking a closer look at the errors was able to realize that if(win32) needs to be modified to if(MSVC) so made the required modification in the CMAKE file and was able to build sucessfully.

Anyways Thanks for the response @tonytheodore @kaniini

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants