troglobit / pimd

PIM-SM/SSM multicast routing for UNIX and Linux
http://troglobit.com/projects/pimd/
BSD 3-Clause "New" or "Revised" License
197 stars 87 forks source link

pimd (git version r7655b67) fails to build from source on Debian testing #11

Closed Corin-EU closed 12 years ago

Corin-EU commented 12 years ago

Current pimd version r7655b67 in the git repository fails to compile for two reasons.

In the makefile, no include path is specified which is necessary for the source tree include directory containing the required header file netinet/pim.h

In the makefile, CFLAGS includes -Werror which means that with gcc-4.6, compilation of any file containing an unused variable will terminate with the unused variable error.

Furthermore the first declaration of CFLAGS in the makefile is CFLAGS =, rather than CFLAGS += which means that the makefile ignores any CFLAG enviromental variable set with the string

"-I /include -Wno-error=unused-but-set-variable"

in order to correct the deficiences of the makefile.

troglobit commented 12 years ago

The Makefile is constructed to work on both GNU/Linux and *BSD systems. There is an include statement to include the file config.mk which does indeed setup the include path "-Iinclude" using the INCLUDES variable. Please see that file for more information on how to configure pimd before building.

However, I agree with you that the use of CFLAGS= rather than CFLAGS+= is rather clumsy. This has been kept for historical reasons, the intent was for the user to employ USERCOMPILE for that same purpose instead. That is what I use when cross-compiling pimd for our embedded systems at work. It should be sufficient for your purposes as well I think.

I've just closed issue #10 after having audited and added some changes of my own to Antonin's original patch. Please try that out and comment.

troglobit commented 12 years ago

OK, I've changed the behavior of CFLAGS in the just tagged v2.1.8. I believe that was the last of the problems detailed in this, and previous, issue #10. Thank you for the report!