Building fswebcam - link fails

It’s my first try to build a package, fswebcam to be exact. To my great surprise everything went well for 11.1 (beginners luck?)

However, it fails for 11.2 during the linking stage. It links against the gd library which is installed but fails to link some functions.

From the log:

installing gd-2.0.36.RC1-54.1

and later on:

gcc -lgd fswebcam.o log.o effects.o parse.o src.o src_test.o src_raw.o src_file.o src_v4l1.o src_v4l2.o -o fswebcam
fswebcam.o: In function `fswc_gdImageDuplicate':
fswebcam.c:(.text+0x1d18): undefined reference to `gdImageCreateTrueColor'
fswebcam.c:(.text+0x1d42): undefined reference to `gdImageCopy'
fswebcam.o: In function `fswc_draw_overlay':
fswebcam.c:(.text+0x1da1): undefined reference to `gdImageCreateFromPng'
fswebcam.c:(.text+0x1dd7): undefined reference to `gdImageCopy'
fswebcam.c:(.text+0x1ddf): undefined reference to `gdImageDestroy'

What could be wrong here?

Hi
It will because of using gcc4.4 either ask the developer to update…
or use gcc4.3 by adding the following;

In the BuildRequires add;


%if 0%{?suse_version} == 1120
BuildRequires:	gcc43 gcc43-c++ libstdc++43-devel
%else
BuildRequires:	gcc gcc-c++
%endif

And in the build section at the beginning


%if 0%{?suse_version} == 1120
export CC=/usr/bin/gcc-4.3
export CXX=/usr/bin/g++-4.3
%endif

If you haven’t already done it, update your spec for the way 11.2
builds as well, instead of the buildroot, use;


%if 0%{?suse_version} < 1120
BuildRoot:	%{_tmppath}/%{name}-%{version}-build
%endif
Autoreqprov:	on

and in the %clean replace with;


%if 0%{?suse_version} < 1120
%clean
%{__rm} -rf '%{buildroot}'
%endif


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.39-0.3-default
up 1 day 3:43, 2 users, load average: 0.00, 0.05, 0.07
GPU GeForce 8600 GTS Silent - CUDA Driver Version: 190.18

Thank you. I’m learning.

Anyhow: still the same result. I can see from the log that it installs gcc43 and does export CC=/usr/bin/gcc-4.3 but then the linking process fails with the same error message.

Should I upload the spec file and the logs somewhere for closer inspection?

Hi
If you just post the build service link to your home project I will
have a look at the spec file and logs. It may be later on as we are
heading off for a few days, so won’t be online until later this evening.


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.39-0.3-default
up 1 day 6:05, 2 users, load average: 0.22, 0.09, 0.09
GPU GeForce 8600 GTS Silent - CUDA Driver Version: 190.18

Hi

Thanks for the suggestion. The link is: https://build.opensuse.org/project/show?project=home%3Avodoo

This is the spec file: fswebcam.spec.html

and the resulting log for 11.2 i586: live_build_log.html

Some more information:

fswebcam compiles and links from source under 11.2 i586. No errors/warnings.

But the linking step fails under build. The gd library is there:

cd /var/tmp/build-root/usr/lib && ls -l libgd.*
lrwxrwxrwx 1 root root     14 Dec 24 15:53 libgd.so -> libgd.so.2.0.0
lrwxrwxrwx 1 root root     14 Dec 24 15:53 libgd.so.2 -> libgd.so.2.0.0
-rwxr-xr-x 1 root root 267528 Oct 19 18:11 libgd.so.2.0.0

I have absolutely no idea what the problem is.

It’s a strange one… I do note that gd and the devel is a release
candidate (gd-devel]-2.0.36.RC1-54.1) which may be the issue. I would
ask over in the packaging or build service mailing lists. Else log it
as a gd bug in bugzilla and see if that helps.

http://en.opensuse.org/Communicate

Else build your own gd version based on the 11.1 version in your home
repository (use the link to other package) then use the build requires
gd <= {your version} to see if that works.


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.2 (i586) Kernel 2.6.31.5-0.1-desktop
up 16:53, 1 user, load average: 0.27, 0.24, 0.32
ASUS eeePC 1000HE ATOM N280 1.66GHz | GPU Mobile 945GM/GMS/GME

Hey Malcolm

I notice that you are short by 2 of your 5000th post. Congratulations!

It’s a strange one…

I’m somehow used to hit strange problems; gives me that strange urge to solve them. gd may be “RC” but it’s very old and the only changes were some obvious bugfix changes. Interesting enough, the SUSE version as packaged has some patches against the original.

I will try to build my version and see if this makes any difference. :wink:

Hi
I would be tempted to post a query on the mailing list and see if
others see an issue. I know I have one issue to work on with the oolite
game I build, builds fine and works on everything except 64bit 11.2
just seg faults…

Dang maybe will hit 5K for Xmas :wink:


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.2 (i586) Kernel 2.6.31.5-0.1-desktop
up 21:28, 1 user, load average: 0.40, 0.32, 0.25
ASUS eeePC 1000HE ATOM N280 1.66GHz | GPU Mobile 945GM/GMS/GME

https://bugzilla.novell.com/show_bug.cgi?id=533563

https://bugzilla.novell.com/show_bug.cgi?id=533563

Bingo! Thank you. Thread closed.