fix bug #1914272: missing -lpthread in matchpoint

Bug #679650 reported by Lukas Jirkovsky
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Hugin
Won't Fix
Low
Unassigned

Bug Description

Attached patch adds -lpthread linker flag to matchpoint when gcc is used. Solves bug #1914272.

Tags: patch
Revision history for this message
Lukas Jirkovsky (l-jirkovsky) wrote :

The file matchpoint_lpthread.patch was added: patch against rev 2978

Revision history for this message
Lukas Jirkovsky (l-jirkovsky) wrote :

Logged In: YES
user_id=2036447
Originator: YES

New patch:
Changed patch to add -lpthread flag according to pthread header existence. That's because gcc can be used on platform that doesn't use posix thread model so this way should be safer.
File Added: matchpoint_lpthread_new.patch

Revision history for this message
Lukas Jirkovsky (l-jirkovsky) wrote :

The file matchpoint_lpthread_new.patch was added: new patch using header control

Revision history for this message
Lukas Jirkovsky (l-jirkovsky) wrote :

Logged In: YES
user_id=2036447
Originator: YES

Third version:
Uses control if system is Unix. I really don't know which way is the best, but all of them are working.
File Added: matchpoint_lpthread_unix.patch

Revision history for this message
Lukas Jirkovsky (l-jirkovsky) wrote :

The file matchpoint_lpthread_unix.patch was added: patch using system control

Revision history for this message
Pablo d'Angelo (pablo.dangelo) wrote :

Logged In: YES
user_id=30308
Originator: NO

Quick note:

I think the source of the problem is the CMake OpenEXR detection script (which should add -lpthread, if it is needed OpenEXR 1.5.0 and later) and needs to be fixed there.

ciao
  Pablo

Revision history for this message
Lukas Jirkovsky (l-jirkovsky) wrote :

Logged In: YES
user_id=2036447
Originator: YES

This is a little bit tricky:

$ pkg-config --libs OpenEXR
-lIlmImf -lImath -lHalf -lIex -lz

$ pkg-config --cflags OpenEXR
-pthread -I/usr/include/OpenEXR

I've found, that it's bug of OpenEXR 1.4.0 (and maybe others):
http://savannah.nongnu.org/bugs/?func=detailitem&item_id=18233

I'm working on patch, which adds -lpthread when old OpenEXR version is used.

Revision history for this message
Lukas Jirkovsky (l-jirkovsky) wrote :

Logged In: YES
user_id=2036447
Originator: YES

I've done patch, which adds -lpthread manually when old (OpenEXR<1.5.0) OpenEXR is used.
Please be patient with me, because I've never worked with cmake before.
File Added: bad_openexr_hack.patch

Revision history for this message
Lukas Jirkovsky (l-jirkovsky) wrote :

The file bad_openexr_hack.patch was added: OpenEXR detection workarround

Revision history for this message
Lukas Jirkovsky (l-jirkovsky) wrote :

Logged In: YES
user_id=2036447
Originator: YES

New info:
The problem persists also in newest stable version of OpenEXR, which makes previous patch unusable.

Revision history for this message
Yuv (yuv) wrote :

Logged In: YES
user_id=1347188
Originator: NO

thank you for your effort, Lukas.

I see a newer bug report on this issue was filed anonymously:

<http://savannah.nongnu.org/bugs/?22822>

is it you? if not, and if you have a login there, vote for it to be fixed. I did.

How familiar are you with the OpenEXR project / codebase ?

I'd hate to see you go working for another project, but maybe the fix for this is on the OpenEXR side of things and not on the hugin side of things? If you decide to go down that avenue and fix OpenEXR, I would appreciate you coming back to hugin after the fix :-)

Revision history for this message
Lukas Jirkovsky (l-jirkovsky) wrote :

Logged In: YES
user_id=2036447
Originator: YES

Yeah, that's my bug report :-)

Actually, I'm not familiar with OpenEXR in any way except this.

Yuv (yuv)
tags: added: patch
Changed in hugin:
status: New → Won't Fix
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.