Graphviz Issue Tracker
Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002533graphvizBuild/Installpublic2015-03-25 08:302015-03-31 05:27
ReporterRubenGarcia 
Assigned To 
PriorityhighSeverityimportantReproducibilityalways
StatusnewResolutionopen 
PlatformVS 2012OSWindowsOS Version7
Summary0002533: Project cannot be updated to work with VS 2012
DescriptionAfter following the instructions in
graphviz-2.38.0-src\doc\winbuild.html
I get the following error after opening the .sln file:

lib\ann\MS_Win32\dll\dll.vcproj: File 'C:\temp\graphviz-2.38.0-src\lib\ann\MS_Win32\dll\dll.vcproj' was not found.
Error lib\ann\MS_Win32\dll\dll.vcproj: No se pudo actualizar el proyecto.
gd
Error lib\gd\gd.vcproj: File 'C:\temp\graphviz-2.38.0-src\lib\gd\gd.vcproj' was not found.
Error lib\gd\gd.vcproj: No se pudo actualizar el proyecto.
gts
Error lib\GTS\gts.vcproj: File 'C:\temp\graphviz-2.38.0-src\lib\GTS\gts.vcproj' was not found.
Error lib\GTS\gts.vcproj: No se pudo actualizar el proyecto.
Steps To ReproduceFollow instructions in
graphviz-2.38.0-src\doc\winbuild.html
and open sln file with visual studio express 2012.
TagsNo tags attached.
AUXILLARY-FILES
DATE-FIXED
FIX-COMMENT
FORMER-ID
INPUT-FILE
OUTPUT-FILE
STATUS-COMMENT
VERSIONgraphviz-2.38.0
Attached Files

- Relationships

-  Notes
User avatar (0000900)
RubenGarcia (reporter)
2015-03-25 08:36

graphviz-2.39.20150325.0445 has the same problem.
User avatar (0000901)
RubenGarcia (reporter)
2015-03-25 08:39

If the update procedure opens graphviz.sln first with MSVS2010, save and close,
and then with visual studio express 2012, the project is correctly updated.

Please add this information to the
doc\winbuild.html
instructions.
User avatar (0000902)
RubenGarcia (reporter)
2015-03-25 08:52

After correct update, the build fails.
It is missing zlib.h and expat.h.
However, zlib and expat are marked as an optional libraries in
http://www.graphviz.org/Download_source.php [^]

So if they are required in windows, this should be stated. If they are not, a suitable config.h should be added to the windows folder, or some instructions added to winbuild.html
User avatar (0000903)
RubenGarcia (reporter)
2015-03-25 08:56

I removed the relevant lines from config.h, confirming that zlib and expat are really optional.
User avatar (0000904)
RubenGarcia (reporter)
2015-03-25 09:00

sfio.h does not compile, giving 830 errors.
First one is error C2143 on line 109:
    typedef ssize_t(*Sfread_f)
    _ARG_((Sfio_t *, Void_t *, size_t, Sfdisc_t *));

Other users are also affected by this, see for example
http://blog.gmane.org/gmane.comp.video.graphviz/month=20090401/page=7 [^]
User avatar (0000905)
RubenGarcia (reporter)
2015-03-25 09:08

The compiler error is due to VS getting confused since ssize_t is not defined at that point.
There should be a
#include <stddef.h>
somewhere in the beginning of sfio.h
User avatar (0000906)
RubenGarcia (reporter)
2015-03-25 09:13

Correction to previous note:
stddef.h does not define ssize_t.

I removed the include and added
#if defined(_WIN64)
typedef signed __int64 ssize_t;
#else
typedef signed int ssize_t;
#endif /* _WIN64 */

as per http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140526/218771.html [^]
User avatar (0000907)
RubenGarcia (reporter)
2015-03-25 09:15

getopt is also a dependant library, but it is not mentioned in
http://www.graphviz.org/Download_source.php [^]

It should be added there, with a mention of whether it is an optional or required library.
User avatar (0000908)
RubenGarcia (reporter)
2015-03-25 10:02

libltdl is not in the sln, and no other visual studio solutions exist withing libltdl.
How is this library compiled?
Please add a solution as with the rest of the modules.
User avatar (0000909)
erg (administrator)
2015-03-26 16:21

Unfortunately, you cannot build Graphviz on Windows by just unwrapping the source code and double-clicking on the .sln file. Setting up the build process for Visual Studio is, for historical reasons, more complicated than it should be. See the top of
 http://www.graphviz.org/doc/winbuild.html [^]
and the link there for more information. In particular, the build assumes you have installed the gtk+, Qt, ltdl, GTS and ANN libraries. These provide such sublibraries as zlib and expat. For Windows, Graphviz provides its own version of the getopt library. The ssize_t type is defined in ast_common.h. At some point, we do need to see what changes are needed for a 64-bit build.

In summary, and ignoring 64-bit builds, if everything is installed in the right places, one can just run fire off the .sln file and get a clean build.
User avatar (0000910)
RubenGarcia (reporter)
2015-03-27 05:10

Ah, I had thought these were optional libraries.
If you can comment that at the moment, the libraries are required for the windows builds, that´d be helpful, especially for us which only need a minimal graphviz library to embed.
User avatar (0000911)
RubenGarcia (reporter)
2015-03-27 05:17

There seems to be something funny going on in ast_common.h:
the definition of ssize_t is commented out.
This should probably be fixed somehow.

#define _typ_ssize_t 1 /* ssize_t is a type */

<removed some non-relevant lines here>

#if !_typ_ssize_t
# define _typ_ssize_t 1
typedef int ssize_t;
#endif
User avatar (0000912)
RubenGarcia (reporter)
2015-03-27 05:24

While getopt.h is provided by graphviz, the LIBRARY (or the C files providing
    extern int getopt(int, char *const *, const char *);
    extern char *optarg;
    extern int opterr, optind, optopt;
) is not included in graphviz-2.38.0
User avatar (0000913)
erg (administrator)
2015-03-27 10:11

Various libraries are optional: one doesn't strictly need any of gtk+, Qt, ltdl, GTS and ANN. For the Windows build we distribute, we include all of them to provide the most features. Indeed, without gtk+ and GTS, many valuable features will be unavailable.

There are various Windows-specific configuration files stored in the windows subdirectory. These are copied into the root directory before the build. In particular, windows/ast_common.h has #define _typ_ssize_t 0.

The implementation of getopt is included as part of the Windows version of the ingraphs library, which is link in by all programs using getopt.

As I wrote above, everything is there and works properly if one follows the procedure outlined in build.bat and further detailed at http://www.graphviz.org/doc/winbuild.html. [^]
User avatar (0000916)
RubenGarcia (reporter)
2015-03-30 04:20

Ah, sorry about that. My browser was displaying the previous version of winbuild.html, which did not mention the new procedure for Graphviz versions ≥ 2.30.
User avatar (0000919)
RubenGarcia (reporter)
2015-03-31 05:27

In any case, since you cannot mix libraries compiled with previous versions of VS
http://www.syndicateofideas.com/posts/fighting-the-msvcrt-dll-hell [^]
and some of graphviz dependencies do not compile in VS2012, I will not be able to get a working version anyway.

Thanks for the support.

- Issue History
Date Modified Username Field Change
2015-03-25 08:30 RubenGarcia New Issue
2015-03-25 08:36 RubenGarcia Note Added: 0000900
2015-03-25 08:39 RubenGarcia Note Added: 0000901
2015-03-25 08:52 RubenGarcia Note Added: 0000902
2015-03-25 08:56 RubenGarcia Note Added: 0000903
2015-03-25 09:00 RubenGarcia Note Added: 0000904
2015-03-25 09:08 RubenGarcia Note Added: 0000905
2015-03-25 09:13 RubenGarcia Note Added: 0000906
2015-03-25 09:15 RubenGarcia Note Added: 0000907
2015-03-25 10:02 RubenGarcia Note Added: 0000908
2015-03-26 16:21 erg Note Added: 0000909
2015-03-27 05:10 RubenGarcia Note Added: 0000910
2015-03-27 05:17 RubenGarcia Note Added: 0000911
2015-03-27 05:24 RubenGarcia Note Added: 0000912
2015-03-27 10:11 erg Note Added: 0000913
2015-03-30 04:20 RubenGarcia Note Added: 0000916
2015-03-31 05:27 RubenGarcia Note Added: 0000919


MantisBT 1.2.5[^]
Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker