Author |
Message
|
wmbwmq |
Posted: Thu Mar 22, 2018 10:23 am Post subject: Link error |
|
|
 Acolyte
Joined: 18 Jul 2011 Posts: 66
|
I am seeing a warning "cannot find entry symbol _start; defaulting to ..." while linking a cluster workload exit (after gcc). Same program with gcc followed by ld is working fine in Solaris. But I see the above mentioned errors in RedHat
The exit is not getting loaded by MQ either.
Should we disable automatic defaulting to _start by ld? |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Mar 22, 2018 6:16 pm Post subject: Re: Link error |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
wmbwmq wrote: |
I am seeing a warning "cannot find entry symbol _start; defaulting to ..." while linking a cluster workload exit (after gcc). Same program with gcc followed by ld is working fine in Solaris. But I see the above mentioned errors in RedHat
The exit is not getting loaded by MQ either.
Should we disable automatic defaulting to _start by ld? |
Most likely your compile and link are bad. Review the manual for examples and learn from them.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
wmbwmq |
Posted: Thu Mar 22, 2018 8:28 pm Post subject: |
|
|
 Acolyte
Joined: 18 Jul 2011 Posts: 66
|
Hey Saper,
Which manual? Sorry my memory might be a little rusty lately.
And the same gcc/ld commands with same options working fine in Solaris though. And its the same workload exit program
Thanks |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Mar 23, 2018 2:00 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
wmbwmq wrote: |
Hey Saper,
Which manual? Sorry my memory might be a little rusty lately.
And the same gcc/ld commands with same options working fine in Solaris though. And its the same workload exit program
Thanks |
Each platform has its own quirks when compiling and linking exits. You need to validate that you are using the correct syntax for your platform...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
mvic |
Posted: Thu Mar 29, 2018 2:38 pm Post subject: Re: Link error |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
wmbwmq wrote: |
I am seeing a warning "cannot find entry symbol _start; defaulting to ..." while linking a cluster workload exit (after gcc). |
Did you solve this? If not...
Try posting the compile and link commands you used.
My best guess is that you have not specified command line switches that tell the linker you want it to produce a shared library.
It's a bit of a guess, but perhaps the _start routine it wants is related to building a full runnable executable? |
|
Back to top |
|
 |
wmbwmq |
Posted: Fri May 25, 2018 8:37 am Post subject: |
|
|
 Acolyte
Joined: 18 Jul 2011 Posts: 66
|
Hey mvic,
Sorry I missed your post earlier.
Yes I got it to work using the follwoing...
gcc -m64 -shared -fPIC -O3 clwl.c -o clwl -I/opt/mqm/inc -L/opt/mqm/lib64 -L/usr/sfw/lib/64 -lmqm -lmqmzf -lmqutl -lnsl -ldl -lrt -lgcc
I think Linux needs "-shared" to be explicitly specified for .so.
Thanks, |
|
Back to top |
|
 |
mvic |
Posted: Fri May 25, 2018 1:30 pm Post subject: |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
|
Back to top |
|
 |
|