octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Development branch mkoctfile missing compiler and linker options?


From: John W. Eaton
Subject: Development branch mkoctfile missing compiler and linker options?
Date: Mon, 3 May 2010 13:46:51 -0400

On  3-May-2010, Jarno Rajahalme wrote:

| Using the development branch, it seems mkoctfile is using somewhat
| different compiler options than what is used when DLD-functions are
| compiled during the make of Octave itself.
| 
| In my case, the following options are missing:
| 
|  -DHAVE_CONFIG_H

We need to clean up the config.h mess, and that's been on my list of
things I'd like to do for some time now but I haven't gotten to it
yet.  Most of what is in Octave's config.h file should not be
installed.  If other Octave header files depend on symbols defined in
config.h, we should try to find ways to eliminate the need for those
symbols.  If that can't be avoided, then we should install a small
subset of config.h that contains only those symbols that are
required to allow the other header files to work.

| -D_THREAD_SAFE -DPIC

Where do these come from and what are they for?  Does any code in
Octave depend on these?  In what variable do they appear in Octave's
generated Makefiles?

| Compiler options:
| -Wall -W -Wshadow -Wold-style-cast -Wformat

I think which warning options to use when building .oct files should
be up to the individual programmer.

| -pthread

Please remind me why/how -pthread is added to the options?  In what
variable does it appear in Octave's generated Makefiles?

| -fno-common

Likewise for this one.  Where does it come from and what is it for?

| -I/Users/Shared/Development/octave/libgnu
| -L/Users/Shared/Development/octave/libgnu
| 
| Missing the libgnu includes used when building Octave can be fatal,
| as gnulib can redefine things like uint64_t. But I'm not exactly
| sure if the linker needs the libgnu, or if these symbols can be
| found from one of the Octave libraries being liked with. -W options
| are about warnings, so they are not critical. But missing -pthread
| can be.

Libgnu is not built as a shared library, so I think the idea is at
that all the replacement functions that gnulib provides are supposed
to be linked with the Octave executable.  Octave doesn't provide the
gnulib functions directly, so if you need them, I think you need to
use gnulib to build your .oct file.

I can see that there could be trouble if Octave header files include
other headers that might be replaced by gnulib.  In what cases does
that happen?

I think that it would be best if we could make it so that gnulib is a
completely "internal" library for Octave so that users need not know
about it at all.  If that is not possible, I'm not sure what the best
approach is.  I doubt that the right solution is for Octave to install
gnulib headers.

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]