Undefined reference to 'cvLoadImage' when running the hello World example

Bug #903393 reported by Fabrice Coutadeur
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
harpia (Ubuntu)
Fix Released
Undecided
Unassigned
Oneiric
Fix Released
Undecided
Unassigned

Bug Description

Hi,

when running the HelloWorld sample in Oneiric, it fails with the following errors:
...
/tmp/cc6g8gjv.o: In function `main':
harpiaBETMP01323722863.43.c:(.text+0xaf): undefined reference to `cvLoadImage'
harpiaBETMP01323722863.43.c:(.text+0xbf): undefined reference to `cvCloneImage'
harpiaBETMP01323722863.43.c:(.text+0xd7): undefined reference to `cvCloneImage'
harpiaBETMP01323722863.43.c:(.text+0xf7): undefined reference to `cvSaveImage'
harpiaBETMP01323722863.43.c:(.text+0x103): undefined reference to `cvReleaseImage'
harpiaBETMP01323722863.43.c:(.text+0x10f): undefined reference to `cvReleaseImage'
harpiaBETMP01323722863.43.c:(.text+0x11b): undefined reference to `cvReleaseImage'
/tmp/cc6g8gjv.o: In function `__static_initialization_and_destruction_0(int, int)':
harpiaBETMP01323722863.43.c:(.text+0x155): undefined reference to `std::ios_base::Init::Init()'
harpiaBETMP01323722863.43.c:(.text+0x15a): undefined reference to `std::ios_base::Init::~Init()'
collect2: ld devolvió el estado de salida 1

[Impact]
No project can be compiled with Harpia, no even the examples, as they all fails with the previous link errors

[Development Fix]
The same patch as the one proposed for Oneiric has been uploaded to Precise as ubuntu2 version.

[Stable Fix]
Retrofit the patch that change the order of the parameters in the compilation line, to put the libraries at the end of the command line, after the object to generate.

[Test Case]
1) Install and run harpia
2) go to help, examples, and choose Hello World
3) click on the Run [F9] button
4) When the button is available again, doble click on the Image box, in the graph
5) With the broken version, you see the errors mentionned previously. With the fixed one, you see the image (a girl with a hat)

[Regression Potential]
Harpia is not usable at all in the actual status.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package harpia - 1.1-0ubuntu2

---------------
harpia (1.1-0ubuntu2) precise; urgency=low

  * as-needed.patch: move libraries at the end of the compilation command line
    to be able to compile the examples (LP: #903393). This fixes a compilation
    error because of undefined references to cv functions
 -- Fabrice Coutadeur <email address hidden> Tue, 13 Dec 2011 06:57:25 +0100

Changed in harpia (Ubuntu):
status: New → Fix Released
description: updated
description: updated
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello Fabrice, or anyone else affected,

Accepted harpia into oneiric-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in harpia (Ubuntu Oneiric):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
DarkJavi (darkjavi) wrote :

Just upgraded to the proposed version, now the hello world example works fine.
:)

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package harpia - 1.1-0ubuntu1.1

---------------
harpia (1.1-0ubuntu1.1) oneiric-proposed; urgency=low

  * as-needed.patch: move libraries at the end of the compilation command line
    to be able to compile the examples (LP: #903393). This fixes a compilation
    error because of undefined references to cv functions.
 -- Fabrice Coutadeur <email address hidden> Tue, 13 Dec 2011 06:57:25 +0100

Changed in harpia (Ubuntu Oneiric):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.