You are not logged in.

#1 2010-07-07 21:42:31

ptchinster
Member
Registered: 2008-12-27
Posts: 45

Help updating PKGBUILD - multipath-tools

I'm having issues updating my PKGBUILD. http://paste.pocoo.org/show/238934/ When i run what is in the build() it compiles just fine (that is, when i run the commands in build() in a live bash shell), and i can make install on it just fine afterwords. When i run makepkg it errors out with a bunch of " undefined reference to " errors during the execution of make. Is there something i need to change with the environment? What would cause makepkg to fail during a build if the command worked fine during a regular shell compilation? I have echo'ed out the absoulte paths and the "make" command is executing in the same directory.

EDIT: details and link

Last edited by ptchinster (2010-07-18 06:40:52)

Offline

#2 2010-07-18 06:46:59

ptchinster
Member
Registered: 2008-12-27
Posts: 45

Re: Help updating PKGBUILD - multipath-tools

In fact - heres the command inside make that it fails on. During a normal, healthy make that is initiated from a live bash shell:

make[1]: Entering directory `/tmp/p/src/multipathd'
cc -pipe -g -Wall -Wunused -Wstrict-prototypes -fPIC -DLIB_STRING=\"lib64\" -I../libmultipath -c -o main.o main.c
cc -pipe -g -Wall -Wunused -Wstrict-prototypes -fPIC -DLIB_STRING=\"lib64\" -I../libmultipath -c -o pidfile.o pidfile.c
cc -pipe -g -Wall -Wunused -Wstrict-prototypes -fPIC -DLIB_STRING=\"lib64\" -I../libmultipath -c -o uxlsnr.o uxlsnr.c
cc -pipe -g -Wall -Wunused -Wstrict-prototypes -fPIC -DLIB_STRING=\"lib64\" -I../libmultipath -c -o uxclnt.o uxclnt.c
cc -pipe -g -Wall -Wunused -Wstrict-prototypes -fPIC -DLIB_STRING=\"lib64\" -I../libmultipath -c -o cli.o cli.c
cc -pipe -g -Wall -Wunused -Wstrict-prototypes -fPIC -DLIB_STRING=\"lib64\" -I../libmultipath -c -o cli_handlers.o cli_handlers.c
cc -pipe -g -Wall -Wunused -Wstrict-prototypes -fPIC -DLIB_STRING=\"lib64\" -I../libmultipath -lpthread -ldevmapper -lreadline -lncurses -ldl -lmultipath -L../libmultipath -o multipathd main.o pidfile.o uxlsnr.o uxclnt.o cli.o cli_handlers.o
/bin/gzip -9 -c multipathd.8 > multipathd.8.gz
make[1]: Leaving directory `/tmp/p/src/multipathd'

And during the makepkg make:

make[1]: Entering directory `/tmp/p/src/multipathd'
cc -pipe -g -Wall -Wunused -Wstrict-prototypes -fPIC -DLIB_STRING=\"lib64\" -I../libmultipath -c -o main.o main.c
cc -pipe -g -Wall -Wunused -Wstrict-prototypes -fPIC -DLIB_STRING=\"lib64\" -I../libmultipath -c -o pidfile.o pidfile.c
cc -pipe -g -Wall -Wunused -Wstrict-prototypes -fPIC -DLIB_STRING=\"lib64\" -I../libmultipath -c -o uxlsnr.o uxlsnr.c
cc -pipe -g -Wall -Wunused -Wstrict-prototypes -fPIC -DLIB_STRING=\"lib64\" -I../libmultipath -c -o uxclnt.o uxclnt.c
cc -pipe -g -Wall -Wunused -Wstrict-prototypes -fPIC -DLIB_STRING=\"lib64\" -I../libmultipath -c -o cli.o cli.c
cc -pipe -g -Wall -Wunused -Wstrict-prototypes -fPIC -DLIB_STRING=\"lib64\" -I../libmultipath -c -o cli_handlers.o cli_handlers.c
cc -pipe -g -Wall -Wunused -Wstrict-prototypes -fPIC -DLIB_STRING=\"lib64\" -I../libmultipath -Wl,--hash-style=gnu -Wl,--as-needed -lpthread -ldevmapper -lreadline -lncurses -ldl -lmultipath -L../libmultipath -o multipathd main.o pidfile.o uxlsnr.o uxclnt.o cli.o cli_handlers.o
main.o: In function `need_switch_pathgroup':
/tmp/p/src/multipathd/main.c:92: undefined reference to `pathinfo'
/tmp/p/src/multipathd/main.c:94: undefined reference to `select_path_group'

The only thing different between those 2 lines are the parts

-Wl,--hash-style=gnu -Wl,--as-needed

that are NOT on the 2nd one (the makepkg invoked failing make).

What would cause this, and how do i fix it?

Last edited by ptchinster (2010-07-18 06:54:08)

Offline

#3 2010-07-18 07:23:30

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,427
Website

Re: Help updating PKGBUILD - multipath-tools

makepkg uses CFLAGS/LDFLAGS defined in /etc/makepkg.conf.   -Wl,--as-needed is defined there as it is quite useful.

Add:

export LDFLAGS=${LDFLAGS//-Wl,--as-needed}

to your PKGBUILD.  And ask the upstream developer to fix it...

Offline

Board footer

Powered by FluxBB