Re: NO_BRIDGE_IMPL() issue (avis is compiled/linked properly)


Philip Preston <PPreston@...>
 

Gagan

It will compile - but the programs won't work because mac os x does not fully implement posix semaphores, and as such it silently fails. Also it won't load the bridge in the example apps unless you change the LIB_EXTENSION to .dylib (if you haven't already).

The function calls exist for posix unnamed semaphores on mac but return error codes indicate they are not implemented - mama doesn't log the failure cause its not an issue on any of the officially supported os. This stops any of the queues working. You can work around this by implementing named semaphores. I'd made some changes to do this for openmama1 and have got most of moved to a local openmama2, following the breakout of platforms in wombatcommon. Have added a darwin folder with appropriate changes.

Happy to pass it on once I get time to finish / tidy it up. Also had it setup in xcode.

Cheers

Phil

Philip Preston
NYSE Technologies

Adelaide Exchange
24-26 Adelaide St
Belfast, BT2 8GD
United Kingdom

t: +44 (0) 2890 822 091
m: +44 (0) 7903 300307
e: ppreston@nyx.com

NYSE Euronext
Powering the Exchanging World
www.nyse.com/technologies
_

----- Original Message -----
From: Gagan Sidhu [mailto:gagan@g-a.ca]
Sent: Thursday, November 29, 2012 06:08 PM
To: openmama-users@lists.openmama.org <openmama-users@lists.openmama.org>
Subject: Re: [Openmama-users] NO_BRIDGE_IMPL() issue (avis is compiled/linked properly)

Hey Glen,

On 2012-11-29, at 10:58 AM, Glenn McClements <gmcclements@nyx.com> wrote:

Hi Gigan,
This looks like the avis bridge lib isn't in being loaded for some reason
(FYI bridge libraries are dynamical *loaded* using dlopen() not
dynamically linked). Is the bridge library and the AVIS in your
DYLD_LIBRARY_PATH? Also putting mamalistenc in full verbose mode may give
more info, i.e:

./mamalistenc -m avis -v -v -v -v

As you said, OSX isn't currently supported but I do know of some people
who have tried in the past and did manage to get something up and running.
yeah, theoretically speaking there is not much of a difference in the required libs.
I installed avis in /usr/local so /usr/local/include contains the avis folder, and /usr/local/lib contains libavis
I didn't export DYLD_LIBRARY_PATH till now, but it looks like this:

GagansMacPro:c Gagan$ echo $DYLD_LIBRARY_PATH
/opt/openmama/lib:/usr/local/lib:

and changing -lmamaavisimpl to -lavis and re-compiling with Makefile -f sMakefile.sample still gets the same sort of issue.
I've tried -v -v -v -v before because will henry suggested it, but that didn't work:

GagansMacPro:c Gagan$ ./mamalistenc -m avis -v -v -v -v
Enter one symbol per line and terminate with a .
Symbol> .
Could not open MAMA avis bridge.

Given that the verbose output doesn't work, I'm really puzzled as to what is causing the issue.

Is there a way to check that the compiled libraries have everything?

FYI: I am new to the whole "trading" thing. I do not have any avis servers or anything like that setup, just the client installed.

I'm wondering why the examples say tiprv/elvin/one other oen, but do not mention avis? I assume elvin is avis but just slightly different.

In any case, is there a way to check the "integrity" of the libraries first? They must be the issue, as the programs compile fine but are failing to load the bridge.



Did you make any other changes to get it building on OSX? If so, and
provided other platforms aren't affected of course, then I'd be happy to
apply them. I can't see NYSE ever supporting this in their commercial
distribution as there isn't a demand for it with their customers, but for
the open source project additional platform support can only be a good
thing.
I agree, but I want to hold off on sharing those changes until we can ensure the build works properly.
They are small changes here and there, but most definitely should not be the reason for the error.

-gAgan ;)

Glenn


On 29/11/2012 17:13, "Gagan Sidhu" <gagan@g-a.ca> wrote:

Hi guys,

Currently I'm on OSX and trying to build the openMAMA libs for my system.

I understand that OSX is not officially supported, but the issue I'm
experiencing is not specific to this platform.

Specifically, I build and install the avis client, copy the config_h to
the suggested directories, and proceed to build mama.

The build and linking goes fine, from what I can see, however the example
programs do *not* work.

I have compiled each one using a slightly modified Makefile.sample (no
-lrt flag or -Xlinker before the -Bstatic/-Bdynamic).

This issue is very strange, because I saw someone else had a bridge issue
but the linked library spit out an error. All I see is:

here's the dump:

GagansMacPro:c Gagan$ make -f Makefile.sample
gcc -I/opt/openmama/include -dynamic -L/opt/openmama/lib -o
mamapublisherc mamapublisherc.o -Bstatic -lmamaavisimpl -lmama -Bdynamic
-lpthread -lm -ldl
gcc -I/opt/openmama/include -c -o mamasubscriberc.o mamasubscriberc.c
mamasubscriberc.c: In function ŒwildCardMsgCb¹:
mamasubscriberc.c:280:56: warning: cast to pointer from integer of
different size [-Wint-to-pointer-cast]
mamasubscriberc.c:285:13: warning: cast from pointer to integer of
different size [-Wpointer-to-int-cast]
gcc -I/opt/openmama/include -dynamic -L/opt/openmama/lib -o
mamasubscriberc mamasubscriberc.o -Bstatic -lmamaavisimpl -lmama
-Bdynamic -lpthread -lm -ldl
gcc -I/opt/openmama/include -c -o mamasymbollistsubscriberc.o
mamasymbollistsubscriberc.c
g++ -I/opt/openmama/include -dynamic -L/opt/openmama/lib -o
mamasymbollistsubscriberc mamasymbollistsubscriberc.o -Bstatic
-lmamaavisimpl -lmama -Bdynamic -lpthread -lm -ldl
gcc -I/opt/openmama/include -c -o mamaproxyc.o mamaproxyc.c
mamaproxyc.c: In function ŒsubscribeToSymbols¹:
mamaproxyc.c:230:34: warning: cast to pointer from integer of different
size [-Wint-to-pointer-cast]
mamaproxyc.c: In function ŒsubscriptionHandlerOnNewRequestCb¹:
mamaproxyc.c:354:62: warning: cast to pointer from integer of different
size [-Wint-to-pointer-cast]
mamaproxyc.c: In function ŒsubscriptionHandlerOnRequestCb¹:
mamaproxyc.c:422:26: warning: cast from pointer to integer of different
size [-Wpointer-to-int-cast]
mamaproxyc.c:435:26: warning: cast from pointer to integer of different
size [-Wpointer-to-int-cast]
g++ -I/opt/openmama/include -dynamic -L/opt/openmama/lib -o
mamaproxyc mamaproxyc.o -Bstatic -lmamaavisimpl -lmama -Bdynamic
-lpthread -lm -ldl
gcc -I/opt/openmama/include -c -o mamaio.o mamaio.c
g++ -I/opt/openmama/include -dynamic -L/opt/openmama/lib -o mamaio
mamaio.o -Bstatic -lmamaavisimpl -lmama -Bdynamic -lpthread -lm -ldl
gcc -I/opt/openmama/include -c -o mamamultisubscriberc.o
mamamultisubscriberc.c
g++ -I/opt/openmama/include -dynamic -L/opt/openmama/lib -o
mamamultisubscriberc mamamultisubscriberc.o -Bstatic -lmamaavisimpl
-lmama -Bdynamic -lpthread -lm -ldl
gcc -I/opt/openmama/include -c -o mamaftmemberc.o mamaftmemberc.c
g++ -I/opt/openmama/include -dynamic -L/opt/openmama/lib -o
mamaftmemberc mamaftmemberc.o -Bstatic -lmamaavisimpl -lmama -Bdynamic
-lpthread -lm -ldl
GagansMacPro:c Gagan$ ./mamalistenc
Enter one symbol per line and terminate with a .
Symbol> ,
Symbol> .
Could not open MAMA wmw bridge.
GagansMacPro:c Gagan$ ./mamalistenc -m avis
Enter one symbol per line and terminate with a .
Symbol> .
Could not open MAMA avis bridge.
Thanks,
Gagan Sidhu,
Director, General Analytics (GA) Inc.

_______________________________________________
Openmama-users mailing list
Openmama-users@lists.openmama.org
https://lists.openmama.org/mailman/listinfo/openmama-users

________________________________

Please consider the environment before printing this e-mail.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient or have received this e-mail in error, please advise the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy.

Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
_______________________________________________
Openmama-users mailing list
Openmama-users@lists.openmama.org
https://lists.openmama.org/mailman/listinfo/openmama-users

________________________________

Please consider the environment before printing this e-mail.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient or have received this e-mail in error, please advise the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy.

Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.

Join Openmama-users@lists.openmama.org to automatically receive all group messages.