> makepkg sets a couple environment variables that are listed in > /etc/makepkg.conf. By default this includes LDFLAGS="-Wl,--as-needed" > which I believe normally produces these kinds of errors. You'll have to > make sure that the gcc command that is run has all necessary -lfoo > arguments at the end of the command line (after the output file iirc). > So `gcc foo.c -o foo -lbar -lblub` > > I haven't dealt with those in months so this information may not be > entirely correct. >
In fact, it is the way to investigate. I am comparing the two generated libguestfs/src/Makefile, and I can find some diff in flags.