LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

lvsbutil unable to find lib symbol.

I am having a problem with trying to build an lsb. When I run make I get the following.

bash-3.00$ make
gcc -I/usr/local/lv70/cintools -fPIC -O -Wall /usr/include/mysql   -c -o mySQL_open.o mySQL_open.c
gcc: /usr/include/mysql: linker input file unused because linking not done
gcc -shared -o mySQL_open.tmp \
        /usr/local/lv70/cintools/cin.o mySQL_open.o  /usr/local/lv70/cintools/libcin.a /usr/lib/libmysqlclient.a
/usr/local/lv70/cintools/lvsbutil -c mySQL_open -t CIN -d `pwd`
/home/dino/bckg/LV_shared/CIN_source/mySQL_open/mySQL_open.tmp: undefined symbol: ERR_get_error_line_data
/usr/local/lv70/cintools/lvsbutil: error building resource file: 1
make: *** [mySQL_open.lsb] Error 2
bash-3.00$


Here is my complete Makefile:-
# This Makefile was generated automatically by lvmkmf & subsequently
# modified by K.D.Giles.
#

CC=gcc
LD=gcc
LDFLAGS=-shared
MYSQLINCDIR=/usr/include/mysql
XFLAGS=-fPIC -O -Wall
CINDIR=/usr/local/lv70/cintools
CFLAGS=-I$(CINDIR) $(XFLAGS) $(MYSQLINCDIR)
MYSQLLIB=/usr/lib/libmysqlclient.a
#MYSQLLIB=-lmysqlclient.a
CINLIB=$(CINDIR)/libcin.a
MAKEGLUE=$(CINDIR)/makeglueLinux.awk
AS=gcc -fPIC -c

.SUFFIXES: .lsb .lsb~ $(SUFFIXES)

# Default rule to create an lsb from a C source file
.c.lsb:    ; make $*.o
    $(LD) $(LDFLAGS) -o $*.tmp \
        $(CINDIR)/cin.o $(XLDFLAGS) $*.o $(CINLIB)
    $(CINDIR)/lvsbutil -c $* -t CIN -d `pwd`
    @rm -f $*.tmp


mySQL_open.lsb:    mySQL_open.o
    $(LD) $(LDFLAGS) -o mySQL_open.tmp \
        $(CINDIR)/cin.o $(XLDFLAGS) mySQL_open.o  $(CINLIB) $(MYSQLLIB)
    $(CINDIR)/lvsbutil -c mySQL_open -t CIN -d `pwd`
    @rm -f mySQL_open.tmp

clean:
    $(RM) -f mySQL_open.o mySQL_open.tmp

spotless: clean
    $(RM) -f mySQL_open.lsb

A check of 'libmysqlclient.a' shows that 'ERR_get_error_line_data' does exist in there. Various functions contained in 'libmysqlclient.a' (e.g. mysql_init) appear to be found by the linker with no problem, as there is no complaint about specific calls to these function from my C code. My code makes no explicit call on 'ERR_get_error_line_data'.

Could anyone point me to where I'm going wrong?
Thanks. Kimdino

0 Kudos
Message 1 of 4
(3,305 Views)
Hi Kimdino,

I think you may have posted your fourm in the wrong place.  This is a LabVIEW fourm.  I can help you with this but I will need some more information from you.

Can you tell me exactly what software and hardware you are using and also what operating system you are using. 

It would also be help full if you could send in your program and maybe I could try and build your LSB here.

Regards,

Seamus
NIUK
0 Kudos
Message 2 of 4
(3,268 Views)
Hi Seamus,
I wasn't too sure that it was the right forum but as CINs are part of LabVIEW it seemed the best bet.

I am using LabVIEW 7.0 on Linux (Mandriva 2006). The hardware is a homebuilt, but standard, AMD64 based PCI-bus PC system. Though the hardware is 64-bit I am still running a 32 bit system on it to maintain compatibilty with others :(. The compiler/linker is the standard gcc setup, unsure which version but it is the standard Mandriva version (probably 4.0.1). No IDE is being used, just the 'make' from the bash prompt. The Makefile is as generated by 'lvmkmf' but with the addition of bits to allow it to find the mySQL headers & object files.

I don't have the code available on this site so I'll send a copy of it tonight when I get home.  However, what I am aiming to do is build a set of CINs to enable Labview 7.0 to use a mySQL database. The problem is occuring when I linking into the mySQL libraries (i.e. libmysqlclient.a). At present the only mySQL library function being called is 'mysql_init()'.

I hope this is enough to help for now? I'll send a copy of the code as soon as I get it.

Thanks,
Kevin Giles,
Siemens VAI

0 Kudos
Message 3 of 4
(3,246 Views)
Hi Seamus,

In addition to the info given earlier I can now tell you the the compiler/linker is gcc version 4.0.1 and I am trying to link to mySQL 5.0 libraries. For what it's worth the Linux kernel is 2.6.12.

Many thanks,
K.D. Giles
Siemens VAI

0 Kudos
Message 4 of 4
(3,236 Views)