You are not logged in.

#1 2004-06-21 17:20:05

Zoobarb
Member
From: Plattsburgh,NY
Registered: 2004-04-22
Posts: 22
Website

Postfix w/mysql support - problems with build

Postfix will not compile with mysql support....

/var/abs/extra/daemons/postfix/src/postfix-2.1.2/src/global/dict_mysql.c:656: undefined reference to `mysql_close'
collect2: ld returned 1 exit status
make: *** [error] Error 1
make: *** [update] Error 1
==> ERROR: Build Failed. Aborting...

This implies it cannot fine the mysql libraries ?...

FROM PKGBULD (my edits added)
build() {
cd $startdir/src/$pkgname-$pkgver
make makefiles CCARGS="-DUSE_SASL_AUTH -I/usr/include/sasl -DHAS_MYSQL -I/usr/include/mysql
-I/usr/include"
AUXLIBS="-L/usr/ilb/sasl2 -lsals2 -L/usr/lib/mysql -lz -lm
-lcrypto -lssl -lmysqlclient -rpath /usr/lib/mysql
-rpath /usr/lib"
make OPT="${CFLAGS}" || return 1

I add /usr/lib/mysql to the ld.so.conf file and reran ldconfig. Not quite sure what to check next...

Thanks for any help.

Offline

#2 2004-06-22 20:49:15

Zoobarb
Member
From: Plattsburgh,NY
Registered: 2004-04-22
Posts: 22
Website

Re: Postfix w/mysql support - problems with build

I tried again without the rpath statement only to get the same results....

I can only guess that this question is:
1) a stumper that no one can answer
2) a stupid question that no one will answer
3) not a configuration anyone has tried yet or
4) a bug in either postfix or mysql that no one else has reproduced.

either way a bit frustrated by the lack of responses.

Any ideas are welcome...

Thanks,
MJB

Offline

#3 2004-06-22 22:18:22

Xentac
Forum Fellow
From: Victoria, BC
Registered: 2003-01-17
Posts: 1,797
Website

Re: Postfix w/mysql support - problems with build

Why not give more context before the error message?  Like, say, what command is run to cause that error.


I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal

Offline

#4 2004-06-23 03:02:40

Zoobarb
Member
From: Plattsburgh,NY
Registered: 2004-04-22
Posts: 22
Website

Re: Postfix w/mysql support - problems with build

Don't really understand your question....

makepkg is the command....

Offline

#5 2004-06-23 03:34:47

Xentac
Forum Fellow
From: Victoria, BC
Registered: 2003-01-17
Posts: 1,797
Website

Re: Postfix w/mysql support - problems with build

*sigh*

When you type makepkg, it runs a bunch of commands in the program's build system.  One of them is probably 'make'.  make runs the commands in Makefiles that usually compile programs using gcc.

What you pasted was an error message resulting from a gcc execution.  So that you can debug things like these, make outputs the gcc command that is being run on the line just above the error message.  Without seeing those messages above (the context) it just becomes guessing.


I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal

Offline

#6 2004-06-23 10:24:02

Zoobarb
Member
From: Plattsburgh,NY
Registered: 2004-04-22
Posts: 22
Website

Re: Postfix w/mysql support - problems with build

return *sigh*

You wanted more output from the make command .... sorry.

I must sound like a dork.  I apologize for not realizing what you were thinking... I am still learning, but...
I understand the basic steps to compiling a program and the steps that are automated (or at least scripted) by makepkg.  I understand dynamically linking libraries to share code among multiple programs to save memory and facilitate easier upgrades (assuming it doesn't break something)..  I think I understand that this problem is either a case of postfix not linking correctly for some reason or postfix is not finding the libraries for mysqlclient.  I do not understand the details of the output.  I have hit the mysql website and they suggest the libraries path needs to be a part of the make Makefiles command under AUXLIBS.  Well, this is done and it seems to make no difference.  The postfix website doesn't do anything more than give you the lines to put in to compile mysql support...those are there and they are not working.  I was also thinking it may be a gcc/postfix/mysql compatability issue.  I know when gcc it upgraded it can break the compilation of some programs (don't know why, I have just seen entries for it.).  The gcc home page does not mention any current problems for postfix or mysql.

Just to test some things out I reinstalled arch on the box and upgraded everything except gcc .... that seemed to break the new packages I just installed.  I tried looking something up with man and it complained about libstdc++ file (don't understand the connection there).  So, I went ahead and upgraded gcc.  Since, that point I have recompiled glibc and gcc by just running makepkg (I updated makepkg.conf and change -O2 to -O1 just for safety and uncommented the line for dual processors).  I am not sure how extensive a recompile is necessary but the gcc site recomends some recompilation for all dependent programs when compiling with a newer major version of gcc.

I sincerely thank you for your offer of help.  You do this for free and it does take time.  I will post more information later today.

Thanks,
MJB

Offline

#7 2004-06-23 20:18:12

Zoobarb
Member
From: Plattsburgh,NY
Registered: 2004-04-22
Posts: 22
Website

Re: Postfix w/mysql support - problems with build

After looking at this some more and doing more research I am getting a consistent error on errno.h

This comes from executing srcpac -Sb ncftp
I got the same error when trying to compile a few other items as well.  The asm-generic directory is not present in my 2.6.3 kernel source tree..

work/ncftp/src/ncftp-3.1.7/sio -I/var/abs/extra/network/ncftp/src/ncftp-3.1.7/Strn DStrFree.c -c
In file included from /usr/include/linux/errno.h:4,
                 from /usr/include/bits/errno.h:25,
                 from /usr/include/errno.h:36,
                 from syshdrs.h:41,
                 from DStrCat.c:1:
/usr/include/asm/errno.h:4:31: asm-generic/errno.h: No such file or directory
In file included from /usr/include/linux/errno.h:4,
                 from /usr/include/bits/errno.h:25,
                 from /usr/include/errno.h:36,
                 from syshdrs.h:41,
                 from DStrFree.c:1:
/usr/include/asm/errno.h:4:31: asm-generic/errno.h: No such file or directory
make[1]: *** [DStrFree.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [DStrCat.o] Error 1
make[1]: Leaving directory `/var/abs/extra/network/ncftp/src/ncftp-3.1.7/Strn'
make: *** [libs] Error 2
==> ERROR: Build Failed.  Aborting...
Error: Failed to build "ncftp"

I will report more as I try to work this out....

Thanks,
MJB

Offline

#8 2004-06-23 20:34:46

Zoobarb
Member
From: Plattsburgh,NY
Registered: 2004-04-22
Posts: 22
Website

Re: Postfix w/mysql support - problems with build

Well, I think I can honestly say this may be fixed but I will not raise the victory flag just yet.

I hit ftp.kernel.org and pulled the original src for 2.6.3 and unpacked into /usr/src/linux-2.6.3 set a symlink /usr/src/linux

in the /usr/include directory I set a symlink:
ln -s /usr/src/linux-2.6.3/include/asm-generic /usr/include/asm-generic

reran srcpac -Sb ncftp

and all worked as expected.... will this translate to the other packages... not sure yet...

The only reason I chose ncftp as a test package was its small and trivial in nature....

I will report more when I get more info...

Offline

#9 2004-06-23 23:47:36

Xentac
Forum Fellow
From: Victoria, BC
Registered: 2003-01-17
Posts: 1,797
Website

Re: Postfix w/mysql support - problems with build

If you were using 2.6.5 or later you wouldn't have to do that.  There was a problem with 2.6.3 missing the asm-generic directory in the package.


I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal

Offline

#10 2004-06-24 03:32:55

Zoobarb
Member
From: Plattsburgh,NY
Registered: 2004-04-22
Posts: 22
Website

Re: Postfix w/mysql support - problems with build

Well... I was not aware of that ... my fault for not looking I guess.

Anyway, all is well now.

Thanks,
MJB

Offline

Board footer

Powered by FluxBB