Re: PATH var and more...

2004-07-12 Thread Miguel Cardenas
> > > 1. Can't add /usr/local/mysql/bin to the PATH var from the main
> > > configuration... Tried to add:
> > > ...
> Modifying the default path setting in /etc/login.conf works well, and
> applies to all shells.  Remember to run 'cap_mkdb /etc/login.conf'
> after your edits.

I found the problem by using the echoes in /etc/profile... efectively the PATH 
was updated as desired, but... when logging in the .profile overrided the 
PATH var instead of simply update it... I commented the PATH=... in 
the .profile and problem got fixed automagically...

> > > 2. MySQL is working fine now, but now that am creating/porting a
> > > client application, once compiled it does not find
> > > libmysqlclient.so... tried to append the path to /etc/ld.so.conf and
> >
> > Edit /etc/rc.conf and add your path to ldconfig_paths, or create a
> >
> That just moves the mysql shlibs from /usr/local/mysql/lib to
> /usr/local/lib/mysql -- the mysqlXX-client port will install
> /usr/local/etc/rc.d/000.mysql-client.sh to add /usr/local/lib/mysql to
> the search path for shlibs automatically.  However that can be run too
> late in the startup sequence for some purposes.  In that case, you can
> use the 'ldconfig_paths' variable in /etc/rc.conf:

Well what I did is add the path to ldconfig_paths in /etc/defaults/rc.conf (/
etc/rc.conf was empty and as far as I understood to override the 1st one, not 
to update it) and everything is working now...

Oh, one additional comment for those who would like to compile MySQL source 
instead using prebuilt binaries... I had too many troubles compiling MySQL... 
this is the right way: do *NOT* use the environment vars that are required to 
compile (CXX, etc...) as shown in the mysql/INSTALL-SOURCE...  in the MySQL 
site at the downloads section, at FreeBSD read the FreeBSD platform notes, it 
uses different configuration settings! if you don't take care of that will 
lose days dealing with the 'sizeof (char)' error and lots of 'sed' errors 
during the ./configure

Regards,
Mike

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: PATH var and more...

2004-07-12 Thread Matthew Seaman
On Sun, Jul 11, 2004 at 04:54:27PM -0500, Dan Nelson wrote:
> In the last episode (Jul 11), Miguel Cardenas said:
> > I've installed MySQL 4.0.20 successfully from source code and
> > programs work fine, but have still two little "problems"...
> > 
> > 1. Can't add /usr/local/mysql/bin to the PATH var from the main 
> > configuration... Tried to add:
> >export PATH=$PATH:/usr/local/mysql/bin to /etc/profile, but didn't
> > work. It only works if I send the command through the bash shell or
> > in $HOME/.profile but /etc/profile does not work... why?  don't want
> > to append it to the .profile of each user!!!
> 
> Add some echos to /etc/profile to make sure it's really being executed,
> maybe.

Modifying the default path setting in /etc/login.conf works well, and
applies to all shells.  Remember to run 'cap_mkdb /etc/login.conf'
after your edits.
  
> > 2. MySQL is working fine now, but now that am creating/porting a
> > client application, once compiled it does not find
> > libmysqlclient.so... tried to append the path to /etc/ld.so.conf and
> > ld-elf.so.conf and run ldconfig, but still not found by system when
> > invoking a program that uses it... how can I add /usr/local/mysql/lib
> > to the libraries path?
> 
> Edit /etc/rc.conf and add your path to ldconfig_paths, or create a
> small startup script to put in /usr/local/etc/rc.d with the command
> "ldconfig -m /usr/local/wherever_libmysqlclient.so_is". /etc/ld.so.conf
> is a Linuxism.
> 
> Or solve both of your problems at once by removing /usr/local/mysql and
> installing the /usr/ports/databases/mysql40-client and mysql40-server
> ports :)

That just moves the mysql shlibs from /usr/local/mysql/lib to
/usr/local/lib/mysql -- the mysqlXX-client port will install
/usr/local/etc/rc.d/000.mysql-client.sh to add /usr/local/lib/mysql to
the search path for shlibs automatically.  However that can be run too
late in the startup sequence for some purposes.  In that case, you can
use the 'ldconfig_paths' variable in /etc/rc.conf:

ldconfig_paths="/usr/lib/compat /usr/X11R6/lib /usr/local/lib /usr/local/lib/mysql"

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   26 The Paddocks
  Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey Marlow
Tel: +44 1628 476614  Bucks., SL7 1TH UK


pgpC8Iws0FLQ3.pgp
Description: PGP signature


Re: PATH var and more...

2004-07-11 Thread Dan Nelson
In the last episode (Jul 11), Miguel Cardenas said:
> I've installed MySQL 4.0.20 successfully from source code and
> programs work fine, but have still two little "problems"...
> 
> 1. Can't add /usr/local/mysql/bin to the PATH var from the main 
> configuration... Tried to add:
>export PATH=$PATH:/usr/local/mysql/bin to /etc/profile, but didn't
> work. It only works if I send the command through the bash shell or
> in $HOME/.profile but /etc/profile does not work... why?  don't want
> to append it to the .profile of each user!!!

Add some echos to /etc/profile to make sure it's really being executed,
maybe.
 
> 2. MySQL is working fine now, but now that am creating/porting a
> client application, once compiled it does not find
> libmysqlclient.so... tried to append the path to /etc/ld.so.conf and
> ld-elf.so.conf and run ldconfig, but still not found by system when
> invoking a program that uses it... how can I add /usr/local/mysql/lib
> to the libraries path?

Edit /etc/rc.conf and add your path to ldconfig_paths, or create a
small startup script to put in /usr/local/etc/rc.d with the command
"ldconfig -m /usr/local/wherever_libmysqlclient.so_is". /etc/ld.so.conf
is a Linuxism.

Or solve both of your problems at once by removing /usr/local/mysql and
installing the /usr/ports/databases/mysql40-client and mysql40-server
ports :)

-- 
Dan Nelson
[EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"