Navigation Menu

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

Can't build with MinGW #887

Closed
veripoolbot opened this issue Feb 26, 2015 · 4 comments
Closed

Can't build with MinGW #887

veripoolbot opened this issue Feb 26, 2015 · 4 comments
Labels
area: configure/compiling Issue involves configuring or compilating Verilator itself resolution: fixed Closed; fixed

Comments

@veripoolbot
Copy link
Contributor


Author Name: HyungKi Jeong
Original Redmine Issue: 887 from https://www.veripool.org
Original Date: 2015-02-26


Build error is occurred on windows, See below...

../VlcTop.cpp: In member function 'void VlcTop::annotateOutputFiles(const string
&)':
../VlcTop.cpp:197:32: error: 'mkdir' was not declared in this scope
      mkdir(dirname.c_str(), 0777);
                                 ^
make[2]: *** [VlcMain.o] Error 1
make[2]: Leaving directory `/home/hkjeong/verilator-3.870/src/obj_dbg'
make[1]: *** [../verilator_coverage_bin_dbg] Error 2
make[1]: Leaving directory `/home/hkjeong/verilator-3.870/src'
make: *** [verilator_exe] Error 2

Maybe need to fix it as below..


#if defined(WIN32) || defined(__MINGW32__)
	mkdir(dirname.c_str());
#else
	mkdir(dirname.c_str(), 0777);
#endif


@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2015-02-26T02:11:31Z


Did that fix work? I would have thought the error would have been different if so.

If it didn't please suggest a patch as I don't use MinGW myself, thanks.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: HyungKi Jeong
Original Date: 2015-02-26T02:38:42Z


Wilson Snyder wrote:

Did that fix work? I would have thought the error would have been different if so.

If it didn't please suggest a patch as I don't use MinGW myself, thanks.

It looks fixed, and work fine.
I use this for my co-simulation tool(http://sourceforge.net/projects/test-drive/) for windows.

And... I'm not familiar to use git for patching this, sorry.
Would you can doing this for me?

I fixed at line 197.

#if defined(WIN32) || defined(__MINGW32__)
     mkdir(dirname.c_str());
#else
     mkdir(dirname.c_str(), 0777);
#endif

And at line 30, include header.

#if defined(WIN32) || defined(__MINGW32__)
#include <direct.h>
#endif

thanks.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2015-02-27T01:43:24Z


Fixed in git towards 3.871.

Your fix was good, thanks, but the way I replicated some code bothered me so I cleaned it up by putting all the OS stuff in one place.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2015-04-05T15:01:00Z


In 3.872.

@veripoolbot veripoolbot added area: configure/compiling Issue involves configuring or compilating Verilator itself resolution: fixed Closed; fixed labels Dec 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: configure/compiling Issue involves configuring or compilating Verilator itself resolution: fixed Closed; fixed
Projects
None yet
Development

No branches or pull requests

1 participant