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

nanomsg header files not found when building #1

Open
vguerra opened this issue May 3, 2014 · 3 comments
Open

nanomsg header files not found when building #1

vguerra opened this issue May 3, 2014 · 3 comments

Comments

@vguerra
Copy link

vguerra commented May 3, 2014

hi @achille-roussel,

I saw your post on the nanomsg mailing list about your binding and wanted to give it a try. Unfortunately the build process brakes on my system b/c the nanomsg header files are not found. I was able to go through trough the 'waf configuration' by simply setting the LINKFLAGS to the location where my nanomsg library file resides; so the configuration script can report that nanomsg was found. But when building waf seems to ignore some enviroment variables I could set to tell it where to find the nanomsg headers ( https://code.google.com/p/waf/wiki/EnvironmentVariables#Variables_that_affect_waf_configure ).

I am missing something here? Is there another way I can tell waf to include those directories when building ?.

While reading a bit about waf, I saw that there is support to query info about installed libraries using pkg-config. Nanomsg installation process provides already such file, so I modified the wscript to query the flags needed when compiling and path of the library file:

https://gist.github.com/vguerra/83e38ed0a9275af08d7c

What do you think about that approach? .. The only down-side that I see is that pkg-config would be required to build the binding.

Have a great one.. and thank you!

@vguerra
Copy link
Author

vguerra commented May 3, 2014

waf seems pretty cool =) and easy to understand ( so far ) .... I injected a couple of lines to the waf script so that a pkg-config file is generated for nanomsgxx:
https://github.com/vguerra/nanomsgxx/commit/99b3d1b5935f0b880e39f661a5c5cc1323ee320b

Not sure if this is the right way of doing things, but I can create a pull request if that is ok with you.

@achille-roussel
Copy link
Owner

Hello, I'm sorry I had my email settings misconfigured on github and I missed that issue you opened, just saw it now.
Thanks for giving it a try and for submitting this patch.
The changes look good, can you tell me what system did you try it on? I'm concerned about windows support (unsure how waf is going to behave if it depends on pkg-config). I've just setup a windows box to work on it so I'll give your patch a try at the same time and see how it goes.

Cheers!

@vguerra
Copy link
Author

vguerra commented Jun 3, 2014

Hi @achille-roussel!

No worries... thank you for responding =).

Sorry that I forgot to mention that I am running on mac os x:

➜ ~ uname -a
Darwin tlf32.wu-wien.ac.at 13.2.0 Darwin Kernel Version 13.2.0: Thu Apr 17 23:03:13 PDT 2014; root:xnu-2422.100.13~1/RELEASE_X86_64 x86_64

pkg-confg should work as well on win but no clue how waf would behave, let me know how the test goes.

Cheers,

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

2 participants