[NCLUG] Newbie programming help

Bob Proulx bob at proulx.com
Mon Apr 14 22:32:32 MDT 2003


mrbrown8 at juno.com wrote:
>  The installation of wxWindows is finished.  On certain
>  platforms (e.g. Linux) you'll now have to run ldconfig
>  if you installed a shared library and also modify the
>  LD_LIBRARY_PATH (or equivalent) environment variable.
> 
> So I ran ldconfig. And when THAT didn't work, the man page told me that
> ldconfig searches the directories listed in /etc/ld.so.conf. I learned
> that libwx_gtk-2.4.so was put in /usr/local/lib and that directory wasn't
> listed in the conf file.

There are different philosophies concerning /usr/local.  Is it a part
of the system?  Or a playland for the user?  If it is part of the
system then the user should not be able to write to it and it is safe
to include into system level things like the /etc/ld.so.con.  But if
part of the system why it is /usr/local and not /usr?  But if it is a
user playland then it is vulnerable to a user breaking (into?) the
system and then it should not be included there.  In that case the
user needs to set 'export LD_LIBRARY_PATH=/usr/local/lib' in their own
user environment and ldconfig is not needed.  Six of one and a
half-dozen of the other.

The safe answer for distributions is to avoid the possible security
hole and require the admin to configure it if needed.  That way the
distribution can't be blamed if /usr/local/lib is used in a security
exploit.

> But, I'm still curious, when do these make varibles get defined?:
> > > make --keep-going --warn-undefined-variables 
> > > Makefile:180: warning: undefined variable `ACLOCAL_M4'
> > > Makefile:183: warning: undefined variable `BUILT_SOURCES'
> > > Makefile:263: warning: undefined variable `HEADERS'
> > > Makefile:263: warning: undefined variable `LISP'
> > > Makefile:271: warning: undefined variable `HEADERS'
> > > Makefile:271: warning: undefined variable `TAGS_DEPENDENCIES'
> > > Makefile:271: warning: undefined variable `LISP'
> > > Makefile:294: warning: undefined variable `HEADERS'
> > > Makefile:294: warning: undefined variable `TEXINFOS'
> > > Makefile:294: warning: undefined variable `EXTRA_DIST'

They are optionally defined in the Makefile.am, which gets processed
into the Makefile.  Since they are optional they don't always get
defined.  You only need to use the parts of the system that you need
to use.

> > Take a look in Makefile.am and see what it is saying.
> 
> Well, my Makefile.am is small:
> 
> SUBDIRS = intl po src
> 
> wxllvhdocdir = ${prefix}/doc/wxLLVH
> wxllvhdoc_DATA = \
> 	README\
> 	COPYING\
> 	AUTHORS\
> 	ChangeLog\
> 	INSTALL\
> 	NEWS\
> 	TODO\
> 	ABOUT-NLS
> 
> EXTRA_DIST = $(wxllvhdoc_DATA)

Hmm...  Since they are defining EXTRA_DIST here it should not showing
up in your undefined variables list above.  Strange.  But in any case
this looks _okay_.  Not really pretty since this does not follow
standard practices for automake.  Blech in fact.  But that is not your
problem, it is Anjuta's problem since it is machine generating the
file.

This is just a top level makefile.  The SUBDIRS is telling it to make
in the subdirectories as well.  The actual source list will be in the
'src' directory.

But I think you are moving now.

Good Luck!
Bob



More information about the NCLUG mailing list