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

Python Wrapper Build Fails #126

Closed
cnlangness opened this issue Mar 30, 2018 · 2 comments
Closed

Python Wrapper Build Fails #126

cnlangness opened this issue Mar 30, 2018 · 2 comments
Labels

Comments

@cnlangness
Copy link
Contributor

I believe the peek functionality that was implemented in pull #106 broke the Python wrapper. From the comments on that pull request, it does not appear that the Python wrapper was tested.

Using the latest from the repo, when building the Python wrapper, I get the following error:

pyRF24Network.cpp: In function ‘void init_module_RF24Network()’:
pyRF24Network.cpp:107:60: error: no matches converting function ‘peek’ to type ‘peek_function_type {aka void (class RF24Network::*)(struct RF24NetworkHeader&)}’
                 , peek_function_type( &::RF24Network::peek )
                                                            ^
In file included from pyRF24Network.cpp:3:0:
/usr/local/include/RF24Network/RF24Network.h:445:8: note: candidates are: void RF24Network::peek(RF24NetworkHeader&, void*, uint16_t)
   void peek(RF24NetworkHeader& header, void* message, uint16_t maxlen);
        ^~~~
/usr/local/include/RF24Network/RF24Network.h:432:12: note:                 uint16_t RF24Network::peek(RF24NetworkHeader&)
   uint16_t peek(RF24NetworkHeader& header);
            ^~~~
error: command 'gcc' failed with exit status 1

I checked out commit a2ce4ae and reinstalled the library. Running ./setup.py build is successful and the module is installed.

After removing the module and checking out commit ce12854 - which is the commit for PR #106, I reinstalled the library. Running ./setup.py build results in the same error message as above.

I'll try my hand at a fix for this, but wanted to open an issue for this in case someone better at boost wants to tackle it.

cnlangness added a commit to cnlangness/RF24Network that referenced this issue Mar 30, 2018
@Avamander
Copy link
Member

@cnlangness Feel free to open a PR with the change.

Though if the non-matching return types actually are an issue, why didn't it fail before? peek has been uint16_t for three years now.

@Avamander Avamander added the bug label Apr 5, 2018
@cnlangness
Copy link
Contributor Author

@Avamander I will open a PR once I confirm that there aren't any adverse downstream effects from adding the uint16_t.

I also plan on digging in to the reason that it is required now. I suspect it may be that during compilation before, there was only one option for peek, so there was no confusion. Now that there are multiple options, it may require more specificity.

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

No branches or pull requests

3 participants