Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build errors w/master #402

Closed
btorpey opened this issue Mar 17, 2020 · 7 comments
Closed

build errors w/master #402

btorpey opened this issue Mar 17, 2020 · 7 comments

Comments

@btorpey
Copy link

btorpey commented Mar 17, 2020

Hi Frank:

Just starting to get back up to date with latest OpenMAMA, and I'm getting build errors:

Linking C shared module libmamaqpidmsgimpl.so
/usr/bin/ld: CMakeFiles/mamaqpidmsgimpl.dir/qpidcommon.c.o: relocation R_X86_64_PC32 against undefined symbol `qpidmsgPayloadInternal_checkLengthAndIncDest' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [mama/c_cpp/src/c/payload/qpidmsg/libmamaqpidmsgimpl.so] Error 1
make[1]: *** [mama/c_cpp/src/c/payload/qpidmsg/CMakeFiles/mamaqpidmsgimpl.dir/all] Error 2
make: *** [all] Error 2

This is on CentOS 7.7, but I see the same build errors on CentOS 6.9.

I've compared my build logs against the build logs at https://ci.appveyor.com/project/fquinner/openmama-gnbjp/branch/master and don't see any obvious reason for build to fail, but I do see one other difference that is odd: I'm getting deprecated errors which don't appear in appveyor build:

[ 67%] Building C object mama/c_cpp/src/c/bridge/qpid/CMakeFiles/mamaqpidimpl.dir/publisher.c.o
/tmp/OpenMAMA/mama/c_cpp/src/c/bridge/qpid/publisher.c: In function ‘qpidBridgeMamaPublisher_send’:
/tmp/OpenMAMA/mama/c_cpp/src/c/bridge/qpid/publisher.c:347:5: warning: ‘pn_messenger_send’ is deprecated (declared at /usr/include/proton/messenger.h:721): Use the Proactor API or Qpid Proton C++ [-Wdeprecated-declarations]
     err = pn_messenger_send (impl->mTransport->mOutgoing,
     ^

Again, this is all pretty vanilla:

cd /tmp
git clone https://github.com/OpenMAMA/OpenMAMA.git
cd OpenMAMA
mkdir build
cd build
cmake ..
make

Any hints would be appreciated -- thanks! Hope all's well with you.

@fquinner
Copy link
Collaborator

Hi Bill, you using the latest repo provided version of qpid proton? Unfortunately I think the latest qpid proton version introduces some issues which came up around time of the last RC I'll have a closer look

@fquinner
Copy link
Collaborator

Related: #272

@btorpey
Copy link
Author

btorpey commented Mar 18, 2020

HI Frank:

Thanks for the quick reply -- nice to hear from you.

The deprecated warnings do in fact appear because the default version of qpid on CentOS 7 is now 0.29 (from epel). I uninstalled that and installed 0.28 from the rpm's, and that took care of the deprecated warnings.

However, that didn't solve the linker error. I poked around a bit and the following declaration looked a bit suspicious:

static inline void
qpidmsgPayloadInternal_checkLengthAndIncDest (mama_size_t  written, 
                                              mama_size_t* length, 
                                              char**        dest);

Removing the inline keyword from the declaration avoids the error -- as does removing the static keyword (and leaving inline), so it seems the combination triggers the error. I've no idea why that is -- https://en.cppreference.com/w/c/language/inline doesn't make that clear, at least not to me.

I also have no clue why the appveyor build doesn't get the error, but as above a simple checkout and vanilla build on CentOS 7 does trigger the error.

btorpey pushed a commit to nyfix/OpenMAMA that referenced this issue Mar 19, 2020
@fquinner
Copy link
Collaborator

I feel like there's no good reason to static nor inline that function so i'd be inclined to just take both keywords out

@bill-torpey
Copy link
Contributor

Created a PR for this -- left inline, although optimizer will prob do that anyway, can't hurt.

This builds on both CentOS 7 and Mac OS.

If you prefer we can lose the inline completely -- your call.

bill-torpey added a commit to bill-torpey/OpenMAMA that referenced this issue Mar 24, 2020
bill-torpey added a commit to bill-torpey/OpenMAMA that referenced this issue Mar 24, 2020
@bill-torpey
Copy link
Contributor

just created a pr in upstream repo for this...#408

@fquinner
Copy link
Collaborator

fquinner commented May 5, 2020

Resolved in #408

@fquinner fquinner closed this as completed May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants