miniupnp.tuxfamily.org Forum Index miniupnp.tuxfamily.org
The forum about miniupnp and libnatpmp
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Minor makefile problem

 
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpd Compilation/Installation
View previous topic :: View next topic  
Author Message
fest3er



Joined: 23 Apr 2013
Posts: 2

PostPosted: Tue Apr 23, 2013 8:18 pm    Post subject: Minor makefile problem Reply with quote

The build (for version 1.7, building on Linux in my case) needs a bit of attention. When using parallel make (e.g., '-j 4'), the configure and the compile run in parallel. This can result in the failure of an automated build; but it doesn't always result in failure. Technically it's a race condition.

A uniprocessor system should never have this error because all the build steps run sequentially. My quad Phenom-II (using '-j 4') never produced it, possibly because genconfig finished before make ever noticed that config.h existed. It appeared yesterday on a system that runs automated daily builds (after building without error for a couple months). In this failure, config.h was only partially written. I have added an explicit configure step that will (obviously) prevent this failure.

The instructions in INSTALL are not faulty; they do say to configure, then edit config.h as needed. But my automated build system patches the sources so that editing is not needed.

I think it may suffice to change genconfig.sh to prepare config.h in a temporary file (maybe config.h.tmp), then rename it to config.h only after it is complete; this should prevent make from proceeding the instant it sees an empty or partially written config.h.
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1394

PostPosted: Wed Apr 24, 2013 5:05 pm    Post subject: Reply with quote

you are right...
see https://github.com/miniupnp/miniupnp/commit/8432646a760988838377945d29c98fd54c456476
_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
fest3er



Joined: 23 Apr 2013
Posts: 2

PostPosted: Wed Apr 24, 2013 5:37 pm    Post subject: Reply with quote

Fast service! Thanks!

N
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpd Compilation/Installation All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP
© 2007 Thomas Bernard, author of MiniUPNP.