GNS3 / dynamips

Dynamips development
GNU General Public License v2.0
355 stars 95 forks source link

compile in MinGW #18

Closed flaviojs closed 1 year ago

flaviojs commented 11 years ago

dynamips doesn't compile in MinGW. Currently it can compile in Cygwin by relying on it's posix-ness.

Tasks:

grossmj commented 10 years ago

Indeed, not having to rely on Cygwin would be great.

TwoWheelDev commented 10 years ago

for mmap it look like this might a solution: http://code.google.com/p/mman-win32/

hertzsprung commented 9 years ago

I just tried compiling an application that includes uuid/uuid.h and x86_64-w64-mingw32-gcc complains that "uuid/uuid.h": No such file or directory. Is this because libuuid(3) isn't supported by mingw?

neozeed commented 9 years ago

I have it building on MinGW. Oddly enough the 'stable' branch runs the MIPS64 JIT quite nicely, while the unstable branch runs the PPC32 JIT. Libuuid will conflict with windows built in uuid support so the fix there is it rename libuuid's uuid_t to something like uu_uuid_t and all references to it in Dynamips. Of course, don't forget to rename the library file, otherwise you'll overwrite the system libuuid.a !

There is some stuff to mess around with sockets in the hypervisor, as Win32 can't treat a socket like a stdio device, but I have it to the point where dynagen 0.11 can talk to dynamips.

I put my stuff here: http://sourceforge.net/projects/dynamips-mingw/

Also I have it compiling with TDM-GCC-64, although none of the JIT works. But it does work interpreted!

grossmj commented 8 years ago

@neozeed we have recently remove the libuuid dependency. Have you made progress?

neozeed commented 8 years ago

I never had issues once I renamed uuid to uu_uuid. But now that I see it's updated, I can pull and re-merge my stuff.

Oh yeah, and doing winpcap dynamically is SO much more nicer, than having it statically linked in. It makes doing demos much more easier without having to install things.

grossmj commented 8 years ago

Sounds good, let me know how that goes.

Thanks :)

neozeed commented 8 years ago

I've got a first pass.... and I still ended up cutting it in half, MIPS from stable, and PowerPC from unstable. Both seem to be somewhat behaved. I've booted 7200 MIPS, and 1700 PPC IOS ok. The pcap code needs to be made more dynamic for UNIX. I've done it before, I just have to find it and put it in there.

I've separated all the bits that are missing from MinGW into the contrib folder.

Also I've been going in circles on the vty code, so for now Im just using an older version of that file. It works 'well enough for now'. Just go into the 'merge' directory and run make, as it's all MinGW32. I guess I should rename merge to mingw..

grossmj commented 8 years ago

Looks like you did a good job :+1: I will be away for the next couple of week, so I won't be able to test before a while. I will post back when I do.

Thanks again! :)

neozeed commented 8 years ago

I forgot, I had to make the unix & vde transports optional as a #ifdef UNIX_ETH & VDE_ETH since Win32 has no good analogue.

julien-duponchelle commented 8 years ago

Awesome

On Fri, Apr 8, 2016 at 2:25 AM neozeed notifications@github.com wrote:

I forgot, I had to make the unix & vde transports optional as a #ifdef UNIX_ETH & VDE_ETH since Win32 has no good analogue.

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/GNS3/dynamips/issues/18#issuecomment-207147925

neozeed commented 7 years ago

I really really need to revisit all of this. You know how live (new kids) and overwhelming jobs go. :|

On a long trip I was reading that book infrastructure as code, and Ive been trying to get to that point for years but it's nice to see it just spelt out. And time to re-tackle dynamips.

grossmj commented 7 years ago

No worries. I am very interested for a version of Dynamips compiled with MinGW.

On Tue, Nov 29, 2016, 18:17 neozeed notifications@github.com wrote:

I really really need to revisit all of this. You know how live (new kids) and overwhelming jobs go. :|

On a long trip I was reading that book infrastructure as code, and Ive been trying to get to that point for years but it's nice to see it just spelt out. And time to re-tackle dynamips.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/GNS3/dynamips/issues/18#issuecomment-263494955, or mute the thread https://github.com/notifications/unsubscribe-auth/AEiE5jwYJpEmpEFM3vjiHDmCJrK_4reJks5rC9GVgaJpZM4A_yL3 .