-
Notifications
You must be signed in to change notification settings - Fork 106
Loading GSL code broken in recent commit #74
Comments
I can't replicate this problem - this code works as expected for me under Linux. Can you tell me what system you are working on? Possibly the same bug as #73 |
I've just given up trying to build GSL under Windows - I have MSVS 2013, which apparently is not supported. Tried using Gnu make with Makefile, but still have problems with pcre. Might be worth an option to build gsl without pcre support? Maybe someone else can try finding the source of this problem - presumably you'll find that file_open (in sflfile.c) is being called with a null filename. If you can get a backtrace at that point we might be able to work out what has happened. |
I actually compiled using a Dockerfile. This is the version that works:
Take out the The OS is CoreOS 604.0.0 running on Vagrant via VMWare Workstation. The underlying OS is Windows. I've been using this setup successfully for some months, but I re-ran the Dockerfile recently and that's when it broke. |
The VS2013 build is only not supported because the PCRE NuGet package isn't available for VS2013 (vc120). Given that PCRE sources are included with GSL it might be better to just eventually include them in the Windows build directly. I think I tried that at one point, but don't remember the problem. Otherwise I could probably package a version of pcre_vc120 in my own NuGet repo. I just didn't see much reason for doing this since most people use GSL as a program and not a library. VS2012 express is available as a free download from MSFT, this is how I use it (and VS2010). |
Also, this break isn't recent, as I was using the NuGet packaged version of GSL that I made some time ago. I did update it locally just to confirm that the problem still exists. |
@bheatwole I don't have a problem getting a version that works, just one that reproduces the bug(s). I use Debian as my native OS, and those commands are pretty much equivalent to what I do anyway. @evoskuil OK so it does seem to be a Windows problem. I'll try the free VS2012 version. But don't let me stop anyone else from producing that backtrace. |
@jschultz I figured as much, otherwise there would be more complaining around here :). |
I tried it on a pure linux system and all commits work there, so it probably is a Windows issue. |
Indeed. And the fact that it concerns file operations makes me suspect that it is related to #73 which also appears to only affect Windows. |
Hmm, my last two comments pertain to #73. Forgot which issue thread I was on. |
@bheatwole You can probably work around by naming the script inside of the XML. I do that on Windows and it works fine: <?xml version = "1.0" ?>
<generate script="lookup_code_generator.gsl">
...
</generate> and gsl -q /project/doc/model/message_model.xml I assume this would bypass the filesystem issue on Windows because the GSL command line is processing the files, not the GSL script processor. |
OK I'll resist the temptation to complain about taking longer to install VS2012 than it would take to install an entire Linux OS, and focus on the more immediate problem of why it still won't build gsl. I just get this:
even when I enable nuGet. Can anyone help me here? |
Open the solution, open the NuGet Package Manager (right click on project) and when the GUI finally opens you should see a band at the top of the Window with a notice to enable download of the missing package. Otherwise you could just run |
See also: https://github.com/imatix/gsl/blob/master/builds/msvc/README.md or more specifically: https://github.com/imatix/gsl/blob/master/builds/msvc/NUGET.md. |
Hmmm none of this seems to work for me. I've tried right-clicking everywhere I can but can't find anything called 'NuGet Package Manager' (maybe you can send me a screenshot?). Tried the buildall.bat script but it also fails instantly and when I look in the logfiles I see similar error message as when I tried building with the GUI. I tried following the README files and met similar dead-ends (manual download of NuGet package manager produces a file that the OS has no more idea than I do what to do with). What am I missing? |
|
Yeah... don't know about that. Did you invoke it from the VS2012 Extension Manager UI? |
You should be able to manually download the PCRE NuGet packages and extract them to the proper location. This avoids the need for the NuGet Package Manager Extension. http://www.nuget.org/packages/pcre To do this you first need to install NuGet (not the extension). |
When I follow that link I just end up somewhere I've already been, ie here: http://visualstudiogallery.msdn.microsoft.com/27077b70-9dad-4c64-adcf-c7cf6bc9970c |
Perhaps a problem with having both VS2012 and VS 2013 installed? |
No, that's not a problem. I use 2010, 2012 and 2013 concurrently. |
http://docs.nuget.org/consume/installing-nuget (See bullet 5 - command line tool). |
OK so 'Manage NuGet packages' appeared on the pull-down menu, once. When I select it, I get an error box saying (FFS I can't even copy the text from the error box - every time I use Windows I am reminded how much I hate it) 'Operation failed The project 'gsl' is unsupported'. Do you use Teamviewer? My Windows box is sandboxed anyway so I'm happy to let you play with it. |
Also, I'm going to update the repository expectations in the GLS solutions so they use a local NuGet repo. Will make it easier, and given it's a standalone app the shared repo isn't so important. |
OK I've some weird things that may explain the strange behaviour around the file functions under Windows. Line 204 of sfldir.c:
is not doing what it looks like it should do. Putting a (char *) cast on the assignment fixes that one. Next gets even weirder. At line 483 of ggfile.c,
the arguments to xstrcpy (which are iterated with va_start), get lost inside xstrcpy, ie srcptr shows a value of 0xffffffff. I'm afraid I'm going to have to put this down now, as I too many other calls on my time. |
I've picked it up. Working through issues. Found another case of the |
If there is a typing problem can we tweak the compiler options so that it gets picked up during compilation? |
I'm not sure, it appears that it may be incorrect presentation in the debugger. It's not happening consistently, and can't make sense of it otherwise. The segment stripping is a real issue though. |
@jschultz The string assignment problem you mention above occurs in at least one other place. It still happens with a |
I wasn't able to fully explain the string assignment issue, but I was able to eliminate it by disabling the UNICODE symbol definition. This affects a large number of definitions and probably somewhere the code is calling a UNICODE (W) vs. ANSI (A) API or similarly using an type defined for UNICODE. It would be better to fix that, but at least we know that's an issue. |
Sometime since commit b260401 the following script breaks:
The command passed to gsl is:
The output is:
Note that there are two spaces after
File:
. Looking at the commit log, I suspect the name of the file is being freed before it can be used, but I haven't tried to debug it.Broken with: 91b9c6d
Last known good commit: b260401
The text was updated successfully, but these errors were encountered: