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

Rewrite build system using automake #6

Merged
merged 7 commits into from
Jul 2, 2011
Merged

Conversation

t-nelson
Copy link
Contributor

Title says it all.

This should improve portability and cross builds by eliminating assumptions and custom tests.

I think I got most of the functionality of the current build system back in place. The log path configure withvar was left out since I didn't see where it was used anymore. Versioning was also change to the Right Way(tm) according to libtool. See http://www.gnu.org/software/libtool/manual/html_node/Versioning.html#Versioning

Initial commit, only linux tested so far.
Solaris automake doesn't have AM_COND_IF yet. It was introduced
in automake 1.10.2.
Include sys/filio.h explicitly as solaris doesn't define BSD_COMP and
thus doesn't pull this header via sys/ioctl.h. Needed for FIONREAD.
It doesn't seem to be in use anymore?
@Memphiz
Copy link
Contributor

Memphiz commented Jun 30, 2011

Just to give my 2 cents here. I think libnfs with such a buildsys is a big step for getting it into the distros ... :D

@sahlberg
Copy link
Owner

sahlberg commented Jul 2, 2011

Can you re-do the patch for my current git tree.

I tried to back the changes I have made to Makefile.in that prevented the merge from working originally
but it looks like some stuff is still missing so I could get it to build with the autotools.

@sahlberg sahlberg merged commit c3d7409 into sahlberg:master Jul 2, 2011
@sahlberg
Copy link
Owner

sahlberg commented Jul 2, 2011

Never mind. There were some junk in my local git tree.
I have merged your patches now.

Thanks!

@t-nelson
Copy link
Contributor Author

t-nelson commented Jul 2, 2011

Great. Thanks for the merge. Feel free to contact me if you have any questions re autotools in the future. I'm no pro but I'm sure I can help you along.

@sahlberg
Copy link
Owner

sahlberg commented Jul 2, 2011

Thanks.

Did you compile and run this successfully from Solaris? If so, could you create a patch for README that Solaris works ?
May I ask which project you use libnfs for, hence your interest to help make it better?

Also, If you want to, I would be very grateful if you volunteer to do the same kind of autotools conversion for libiscsi too :-)

thanks for your help to make libnfs better.

ronnie s

@t-nelson
Copy link
Contributor Author

t-nelson commented Jul 2, 2011

I'm another xbmc dev.

I tested with opensolaris. I'm not sure what the differences are between that and the real deal. I don't have Solaris available.

I'll try to take a look at libiscsi if I can get some free time in the next week.

@sahlberg
Copy link
Owner

sahlberg commented Jul 2, 2011

I think the main difference between the two for an application is
probably just the endianness with opensolaris mainly running on
le-systems and the real deal running on be-systems.
This code does not have any endinanness dependencies so should work on all.

It even works on weirdo PPC/AIX afaik with its weird changes to
'struct sockaddr'

:-)

On Sat, Jul 2, 2011 at 3:28 PM, t-nelson
reply@reply.github.com
wrote:

I'm another xbmc dev.

I tested with opensolaris. I'm not sure what the differences are between that and the real deal. I don't have Solaris available.

I'll try to take a look at libiscsi if I can get some free time in the next week.

Reply to this email directly or view it on GitHub:
#6 (comment)

@sahlberg
Copy link
Owner

sahlberg commented Jul 2, 2011

Ouch, that reminds me.

Your patch quite likely actually broke AIX and all other legacy unixens that have a
specific sock addr length field

#ifdef HAVE_SOCK_SIN_LEN
sin->sin_len = socksize;
#endif

This kind of code. On legacy unixen we need to know if sockaddr structure needs a sin_len assigment or things will break.

Could you add detection of whether HAVE_SOCK_SIN_LEN checks back to the configure checks and to config.h, else legacy unixens will break.

@sahlberg
Copy link
Owner

sahlberg commented Jul 7, 2011

Oh man

This just reminded me on why and how much I hate libtools with such a passion.
It breaks both gdb and valgrind so they become almost useless.

Do you know the command line to use to get meaningful valgrind output
for for example ./examples/nfsclient-bcast which should provide a
warning about conditional jump depending on an unitialized variable ?

regards
ronnie sahlberg

On Sat, Jul 2, 2011 at 11:26 AM, t-nelson
reply@reply.github.com
wrote:

Great. Thanks for the merge. Feel free to contact me if you have any questions re autotools in the future. I'm no pro but I'm sure I can help you along.

Reply to this email directly or view it on GitHub:
#6 (comment)

@t-nelson
Copy link
Contributor Author

t-nelson commented Jul 7, 2011

nelson11@zoidberg:~/code/libnfs/examples$ libtool --mode=execute valgrind -v --leak-check=full --show-reachable=yes ./nfsclient-bcast

Seems to do the trick.

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

Successfully merging this pull request may close these issues.

None yet

3 participants