[Bioc-devel] C++ compiler flags on Windows

Martin Morgan mtmorg@n@b|oc @end|ng |rom gm@||@com
Mon Aug 1 17:17:41 CEST 2022


Hi Fabrico – I’m not the right person to answer the question that you asked, but on the build report the problem is the error, rather than warnings

mcscanxr.cpp: In function 'void msa_main(const char*)':
mcscanxr.cpp:853:46: error: too many arguments to function 'int mkdir(const char*)'
  853 |         mkdir(html_fn,S_IRWXU|S_IRGRP|S_IXGRP);
      |                                              ^
In file included from c:\rtools42\x86_64-w64-mingw32.static.posix\include\sys\stat.h:14,
                 from mcscanxr.h:47,
                 from mcscanxr.cpp:26:
c:\rtools42\x86_64-w64-mingw32.static.posix\include\io.h:282:15: note: declared here
  282 |   int __cdecl mkdir (const char *) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
      |               ^~~~~

You’re calling mkdir with two arguments, but in  RTools42 for the x86_64 platform, the header file includes just a single argument.

I’m also not the right person to solve this problem. From a bit of googling, it seems like you would test in your C code whether you’re on Windows or not and invoke with the permissions argument only if not on Windows. This is done here, for instance https://code.bioconductor.org/browse/BGmix/blob/master/src/rundir.cpp#L53 .

The tag __MINGW_ATTRIB_DEPRECATED_MSVC2005 suggests that there is a better entry point for ‘mkdir’ on Windows. Some googling suggests _mkdir or _wmkdir.

I notice that on the package landing page https://bioconductor.org/packages/3.16/bioc/html/syntenet.html there is no Windows binary, suggesting that it has never built successfully. It could be that the intermittent results you observed was actually due to something else, like the Windows builder not reporting for that day. The single package builder results have expired, so I’m not sure why those builds were successful; the builders and single package builder are not identical.

From: Bioc-devel <bioc-devel-bounces using r-project.org> on behalf of Fabricio de Almeida <fabricio_almeidasilva using hotmail.com>
Date: Monday, August 1, 2022 at 3:14 AM
To: Bioc-devel using r-project.org <bioc-devel using r-project.org>
Subject: [Bioc-devel] C++ compiler flags on Windows
Dear Bioc developers,

I recently had a package accepted that passed the build system during review.

One week after acceptance, there were compilation problems on Windows. In the next build, the problems disappeared. Now, they're back again: http://bioconductor.org/checkResults/devel/bioc-LATEST/syntenet/palomino4-install.html

These compilations problems - and the fact that they appear and disappear without any intervention from me - seem to be related to changing C++ compiler flags in the Bioconductor build system for Windows.

Does anyone know if C++ compiler flags were changed recently on Windows in the Bioc build system? As I don't have a Makevars file in the /src directory of this package, does anyone know which flags I could include in a Makevars file to remove these Windows-specific warnings in compilation? I was wondering whether any of you had similar problems.

Kind regards,
Fabricio


=========================


Fabr�cio de Almeida Silva, MSc.

PhD student in Bioinformatics (Ghent University, Belgium)

UGent-VIB Center for Plant Systems Biology

Personal website: https://almeidasilvaf.github.io


        [[alternative HTML version deleted]]

	[[alternative HTML version deleted]]



More information about the Bioc-devel mailing list