[rabbitmq-discuss] Trouble building rabbitmq-c on windows

Paul Pearcy paul.pearcy at wallst.com
Wed Dec 15 20:55:23 GMT 2010


Sorry for the noise, I believe I have gotten to the bottom of this.

By default on our systems, we have the $CL var have a couple of default values that were not playing nice. After clearing this var and restarting everything, things look sane.


From: Paul Pearcy
Sent: Wednesday, December 15, 2010 1:36 PM
To: Paul Pearcy; rabbitmq-discuss at lists.rabbitmq.com
Subject: RE: Trouble building rabbitmq-c on windows

I got past my initial error by adding spaces to the start and end of my $CL env variable. For some reason mingw didn't like them, while cygwin is fine either way.

Now stuck on this error:
configure:3128: cl.exe -nologo   conftest.c  >&5
conftest.c

LINK : error LNK2001: unresolved external symbol _mainCRTStartup

conftest.exe : fatal error LNK1120: 1 unresolved externals

I can run the command outside of the configure script and get it to succeed, so I am a little baffled.

Thanks,
Paul

From: rabbitmq-discuss-bounces at lists.rabbitmq.com [mailto:rabbitmq-discuss-bounces at lists.rabbitmq.com] On Behalf Of Paul Pearcy
Sent: Wednesday, December 15, 2010 11:12 AM
To: rabbitmq-discuss at lists.rabbitmq.com
Subject: [rabbitmq-discuss] Trouble building rabbitmq-c on windows

Hello,
  I am unfortunately stuck on Windows and C land and am trying to get the rabbitmq-c client built up on windows using the Visual Studio compiler.

First off, this client is marked as experimental. I am curious how experimental this is... for instance, would I be a fool to use this library for production purposes? If so, is there a different recommended library or should I be looking at a different messaging system with better C support?

I am have gone through the README.windows many times and think I understand the steps, but there is some disconnect.

Here are the steps I took:

1)      Grabbed the recommended mingw package using the given install script

2)      Coped rabbitmq-c and rabbitmq-codegen(though I'm not sure what this one does yet) into the mingw directory.

3)      Start up the bash from my new mingw

4)      Verify that python is available and that /bin is in my path for mingw apps (I actually had to add /bin to my PATH)

5)      Ran the mount command as specified: mount 'C:\mingw' /mingw - this succeeds

6)      Enter the rabbitmq-c directory and kick off the build: etc/build-ms.sh


Below are the outputs from the configure run. I have tried this on a Windows7 machine and a WindowsXP machine and in both cases, I got the same results. It looks to me like the command to verify the compiler isn't being run correctly.

Please let me know if there are any ideas.

Thanks,
Paul


Here is the output from this:

Using Visual Studio install at /C/Program Files/Microsoft Visual Studio 8
Using Windows SDK install at /C/Program Files (x86)/Microsoft Visual Studio 8/VC
/PlatformSDK
+ autoreconf -i
C:\mingw\bin\libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configur
e.ac and
C:\mingw\bin\libtoolize: rerunning C:\mingw\bin\libtoolize, to keep the correct
libtool macros in-tree.
C:\mingw\bin\libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.
am.
+ ./configure CC=cl.exe LD=link.exe CFLAGS=-nologo
checking for a BSD-compatible install... /bin//install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin//mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... cl.exe
checking whether the C compiler works... no
configure: error: in `/rabbitmq-c-fd437100993d':
configure: error: C compiler cannot create executables
See `config.log' for more details.

Here is what I see in the config.log:
configure:3061: checking for C compiler version
configure:3070: cl.exe --version >&5
Microsoft (R) Incremental Linker Version 8.00.50727.42

Copyright (C) Microsoft Corporation.  All rights reserved.



/out:Oy-.exe

C:/mingw/Oy-

LINK : fatal error LNK1181: cannot open input file 'C:/mingw/Oy-.obj'

Microsoft (R) C/C++ Optimizing Compiler Version 14.00.50727.42 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

cl : Command line warning D9002 : ignoring unknown option '--version'
cl : Command line warning D9024 : unrecognized source file type 'C:/mingw/Oy-', object file assumed
configure:3081: $? = 2
configure:3070: cl.exe -v >&5
Microsoft (R) Incremental Linker Version 8.00.50727.42

Copyright (C) Microsoft Corporation.  All rights reserved.



/out:Oy-.exe

C:/mingw/Oy-

LINK : fatal error LNK1181: cannot open input file 'C:/mingw/Oy-.obj'

Microsoft (R) C/C++ Optimizing Compiler Version 14.00.50727.42 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

cl : Command line warning D9002 : ignoring unknown option '-v'
cl : Command line warning D9024 : unrecognized source file type 'C:/mingw/Oy-', object file assumed
configure:3081: $? = 2
configure:3070: cl.exe -V >&5
Microsoft (R) C/C++ Optimizing Compiler Version 14.00.50727.42 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

cl : Command line error D8004 : '/V' requires an argument
configure:3081: $? = 2
configure:3070: cl.exe -qversion >&5
Microsoft (R) Incremental Linker Version 8.00.50727.42

Copyright (C) Microsoft Corporation.  All rights reserved.



/out:Oy-.exe

C:/mingw/Oy-

LINK : fatal error LNK1181: cannot open input file 'C:/mingw/Oy-.obj'

Microsoft (R) C/C++ Optimizing Compiler Version 14.00.50727.42 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

cl : Command line warning D9002 : ignoring unknown option '-qversion'
cl : Command line warning D9024 : unrecognized source file type 'C:/mingw/Oy-', object file assumed
configure:3081: $? = 2
configure:3101: checking whether the C compiler works
configure:3123: cl.exe -nologo   conftest.c  >&5
cl : Command line warning D9024 : unrecognized source file type 'C:/mingw/Oy-', object file assumed

conftest.c

LINK : fatal error LNK1181: cannot open input file 'C:/mingw/Oy-.obj'

configure:3127: $? = 2
configure:3165: result: no
configure: failed program was:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20101215/528f54f9/attachment.htm>


More information about the rabbitmq-discuss mailing list