What generates disabledPlugins.c?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
24 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Switching (back) to MSVC (Re: [Vm-dev] What generates disabledPlugins.c?0

Geoffroy Couprie
 


On Thu, Jul 22, 2010 at 9:59 PM, Eliot Miranda <[hidden email]> wrote:
 


On Thu, Jul 22, 2010 at 11:55 AM, Geoffroy Couprie <[hidden email]> wrote:
 


On Thu, Jul 22, 2010 at 8:06 PM, Eliot Miranda <[hidden email]> wrote:
 
Hi Geoffroy,

On Thu, Jul 22, 2010 at 10:34 AM, Geoffroy Couprie <[hidden email]> wrote:
 
Hello,

On Thu, Jul 22, 2010 at 5:20 PM, Andreas Raab <[hidden email]> wrote:

On 7/22/2010 4:55 AM, David T. Lewis wrote:
On Wed, Jul 21, 2010 at 08:49:19PM -0700, Eliot Miranda wrote:
But the more serious issue is that the configure in VMMaker is only suitable
for linux.  I guess that the right thing to do for FreeBSD is to run make in
platforms/unix/config to generate a FreeBSD-specific configure.  But I'm out
of my depth when it comes to autoconf.

Note that Ian moved to CMake for the unix builds, so autoconf is no longer
used for building from the SVN trunk. In addition, Geoffroy Couprie has
developed this further such that the VM can be built for both unix and
Windows targets, see thread here:

 http://lists.squeakfoundation.org/pipermail/vm-dev/2010-May/004574.html

It's up to Ian and Andreas to say if they want to pursue this direction,
but if you need the Cog build process to be more platform independent
this would be a good thing to consider.

Personally, I'll be moving the Windows build back into MS land. All the reasons for using the MingW/GCC tool chain are gone by now:
* Availability of the tool chain: There have been free versions of MSVC for years now, so this is no longer an issue.
* Performance of the VM: With the JIT, the performance difference between the compilers no longer matters.
* Size of difficulty of the install: New versions of MingW are no easier to install than Cygwin or other monsters.
 
MSYS is not that hard to install. And GCC can be use to cross compile, which is really useful for tests, continuous integration, etc.

What about C++ compilation?

I don't know what issues you encountered, but 3.4.5 was fine, 4.2 had broken exception handling, and 4.4 works well.

The issue is that binaries produced with g++ -mno-cygwin -mwindows will not work because there is no support for them in the MS run-time.

Well, now, g++ produces working binaries.
 


 
* Consistent use of runtime libraries: For some external linkage, having the latest MSVC platform libraries available is important.

At this point the advantage is clearly with the MS tool chain and the only hurdle is that I'll have to update all the makefiles etc.
 Well, here goes my shameless advertisement: CMake could be used to generate Makefiles for MSVC :)
I think it would still need to be fixed though, but that's less work to do.

Anyway, do you think you could keep the code compatible with GCC? I could take care of the header fixes.

Yes.  Its just a matter of ifdeffing, and the differences can be localized.  There are differences anyway.  Since MingW uses the MS libraries a few choice MS incompatibilities surface such as printf format specifiers for 64-bit values, in C99 %llx %lld et al are used, but in MS it's %I64x %I64d etc.  Hence

#if _MSC_VER
# define LLFMT "I64d"
#else
# define LLFMT "lld"
#endif

Yes, THAT is really annoying. We encountered a lot of problems with 32/64 code and format specifiers in vlc, but switching to gcc 4.4 fixed them.

How does 4.4 fix the issue?  Remember we're talking about -mno-cygwin -mwindows because under that environment there's no GPL issue.
Sorry, I was confusing with something else. We redefined the symbols too.
Reply | Threaded
Open this post in threaded view
|

Re: Switching (back) to MSVC (Re: [Vm-dev] What generates disabledPlugins.c?0

Geoffroy Couprie
In reply to this post by Andreas.Raab
 


On Fri, Jul 23, 2010 at 5:36 AM, Andreas Raab <[hidden email]> wrote:

On 7/22/2010 5:24 PM, David T. Lewis wrote:
On Thu, Jul 22, 2010 at 02:15:01PM -0700, Andreas Raab wrote:
Seriously? You mean that if I drop the stuff from
http://eleves.ec-lille.fr/~couprieg/divers/patches.zip into my build
tree cmake will magically generate MSVC build files and it'll just work?
If that's actually true, I'm sold :-)

I'll try it tonight.

It's possible that it actually *is* true. This is exactly what CMake
was designed to do (hence the name, "Cross-platform Make").

Not much success. I tried running CMake naively and was instantly greeted with the recommendation to run cmake/configure. Which of course is a shell script so needs to be run from Cygwin.
 
Sorry about that. When I wrote my patches, I was using MinGW on Linux or on Windows with MSYS, so a shell was easier to use. I didn't consider MSVC at that time. I can fix it and not require a shell.
 
When I do that (after some fiddling with --src and --generator) it complains that the win32 directory doesn't have a CMakeLists.txt:

$ ../platforms/win32/cmake/configure --src=./src/ --generator="Visual Studio 10"
-- Configuring squeak  for i686-pc-cygwin
-- Using source directory /cygdrive/c/SqueakVM/cmake-test/winbuild/src
-- Using generator Visual Studio 10
../platforms/win32 -DVM_HOST=i686-pc-cygwin -DPLATFORM_SOURCE_VERSION= -DVM_VERSION= -DOPT--src=/cygdrive/c/SqueakVM/cmake-test/winbuild/src
CMake Error: The source directory "C:/SqueakVM/cmake-test/platforms/win32" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.

Which is correct, but I don't see a CMakeLists.txt in the patches. So I'm at a loss at this point. Geoffrey, any instructions?
 
That's weird. IIRC, the file platforms/CMakeLists.txt file exists, and it shouldn't look for that file in platforms/win32. I'll fix the configure script this evening.
Reply | Threaded
Open this post in threaded view
|

Re: Switching (back) to MSVC (Re: [Vm-dev] What generates disabledPlugins.c?0

Igor Stasenko
 
2c.

One of good things switching to MSVC is debugging.
The gdb is cool, when today is 70's. i found debugging VM built by GNU
tools under windows is real pain.

But the downside of it, i think will be loss of performance - AFAIK
MSVC does not supports jump tables (which is used by
gnuification step), which gives roughly 30% increase in interpreter performance.


--
Best regards,
Igor Stasenko AKA sig.
Reply | Threaded
Open this post in threaded view
|

Re: Switching (back) to MSVC (Re: [Vm-dev] What generates disabledPlugins.c?0

Hockenberry
CONTENTS DELETED
The author has deleted this message.
12