In instantiation of GSLBuilder in Build.PL, the value for the parameter include_dirs...
commit589487844e5fb87773fbae2207241c488a7366c3
authorJakob Ilves <illvilja@oracle.com>
Mon, 30 Nov 2009 23:12:55 +0000 (1 00:12 +0100)
committerJakob Ilves <illvilja@oracle.com>
Tue, 1 Dec 2009 23:08:51 +0000 (2 00:08 +0100)
tree2f7f9781ecdc534acf30fe010871b961f98b53c0
parent5dd4226b259b5a8e08d7868d3be2a1c302309000
In instantiation of GSLBuilder in Build.PL, the value for the parameter include_dirs were corrected to an anonymous empty array, instead of an empty string.

There were a build failure where gcc gets confused and 'loses' one
of the supplied -I flags (the one specifying the directory
containing the core perl header files), resulting in gcc not
finding a number of very fundamental header files for perl modules.

This is caused by a single '-I' flag appearing before the 'lost' -I
flag.  That lone '-I' flag is the result of trying to use the -I
flag to add a directory consisting of the empty string to the list
of directories to search for include files.

The fix is to prevent that bogus empty string directory to enter
the build logic in the first place:

In the instantiation of the GSLBuilder class, I changed the
value passed for the 'include_dirs' from an empty string to a
(reference to) an empty array.  This prevents the lone '-I' flag
to be passed to gcc, making gcc properly understand the rest
of the command line.

(The GSLBuilder code can be amended to actually fail when
'include_dirs' is given an empty string, and in that failure,
tell that 'include_dirs' should be given an empty list if
one wants to state that there should be no include directories)
Build.PL