2014-12-04 17:29 GMT+06:00 Jeff Squyres (jsquyres) <jsquy...@cisco.com>:

> On Dec 3, 2014, at 11:35 PM, Artem Polyakov <artpo...@gmail.com> wrote:
>
> > Jeff, I must admit that I don't completely understand how your fix work.
> Can you explan me why this veriant was failing:
> >
> > CPPFLAGS="-I$srcdir/opal/libltdl/"
> > AC_EGREP_HEADER([lt_dladvise_init], [$srcdir/opal/libltdl/ltdl.h]
> >
> > while the new one:
> >
> > CPPFLAGS="-I$srcdir -I$srcdir/opal/libltdl/"
> > AC_EGREP_HEADER([lt_dladvise_init], [opal/libltdl/ltdl.h],
> >                          [OPAL_HAVE_LTDL_ADVISE=1])
> >
> > works well?
> >
> > Is there additional header files that are included in conftest.c and has
> to be reached through $srcdir?
>
> No, it was simpler than that: "." (i.e., $srcdir in a non-VPATH build) is
> not necessarily in the default include search path for <> files (which is
> what AC_EGREP_HEADER uses).  For example:
>
> -----
> [3:24] savbu-usnic-a:~/g/ompi (topic/master-libfabric●)
> $ cat test.c
> #include <./opal/libltdl/ltdl.h>
> [3:24] savbu-usnic-a:~/g/ompi (topic/master-libfabric●)
> $ gcc -E test.c > /dev/null
> test.c:1:33: fatal error: ./opal/libltdl/ltdl.h: No such file or directory
>  #include <./opal/libltdl/ltdl.h>
>                                  ^
> compilation terminated.
> -----
>
> Notice that if I don't have -I. (i.e., -I$srcdir), the above compilation
> fails because it can't find <./opal/libltdl/ltdl.h>.
>
> But if I add -I., then the file can be found:
>
> -----
> [3:24] savbu-usnic-a:~/g/ompi (topic/master-libfabric●)
> $ gcc -E test.c -I. > /dev/null
> [3:25] savbu-usnic-a:~/g/ompi (topic/master-libfabric●)
> $ echo $status
> 0
> -----
>
> And since we're -I$srcdir, there's no need to include $srcdir in the
> filename.  Indeed, if $srcdir==., then adding it in the filename is
> harmless.  But if $srcdir=/path/to/somewhere, it's actually a problem.
> Regardless, $srcdir should no longer be in the filename.
>
> The part I forgot was that your version of libtool also requires some sub
> header files in the $srcdir/opal/libltdl tree, so a -I for that also needs
> to be there.
>
> Make sense?
>
Yes. Thank you!


>
> --
> Jeff Squyres
> jsquy...@cisco.com
> For corporate legal information go to:
> http://www.cisco.com/web/about/doing_business/legal/cri/
>
> _______________________________________________
> devel mailing list
> de...@open-mpi.org
> Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/devel
> Link to this post:
> http://www.open-mpi.org/community/lists/devel/2014/12/16433.php




-- 
С Уважением, Поляков Артем Юрьевич
Best regards, Artem Y. Polyakov

Reply via email to