LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-04-2015, 07:23 PM   #1
apreston
LQ Newbie
 
Registered: Sep 2002
Location: Calgary, Alberta, Canada
Distribution: Kubuntu x86-64 15.04
Posts: 22

Rep: Reputation: 0
How do I compile ufraw on Kubuntu 15.04 64-bit?


I've been trying to compile ufraw-0.22 on my Kubuntu 15.04 system, but have run into a file not found error that I don't know how to properly fix. ./configure runs fine with no errors. make errors out with a file not found message:

make[2]: Entering directory '/usr/src/ufraw-0.22'
CXX dcraw.o
dcraw.cc:98:60: fatal error: glib/gi18n.h: No such file or directory
#include <glib/gi18n.h> /*For _(String) definition - NKBJ*/
^
compilation terminated.
Makefile:886: recipe for target 'dcraw.o' failed
make[2]: *** [dcraw.o] Error 1
make[2]: Leaving directory '/usr/src/ufraw-0.22'
Makefile:1026: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/usr/src/ufraw-0.22'
Makefile:581: recipe for target 'all' failed
make: *** [all] Error 2

Since that file IS present on my system, I assume make is looking in the wrong place. I tried editing dcraw.cc to point to the correct location, but that led to further errors of the same type.

Can you advise the proper way to handle this situation?

Using the package manager to install the software is not a viable solution: the ufraw package available in ubuntu's repositories is outdated and not compatible with current camera models. Ubuntu packages of newer versions of ufraw apparently do not exist.

Al Preston
 
Old 09-04-2015, 09:17 PM   #2
norobro
Member
 
Registered: Feb 2006
Distribution: Debian Sid
Posts: 792

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
ufraw-0.22 compiled on my Debian system.

Take a look in config.log to see if configure found glib.

You can run pkg-config from the command line:
Code:
$ pkg-config --cflags glib-2.0
-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
Then instead of editing the source code try editing the Makefile to put in the correct include directories. Line 400 of my Makefile is:
Code:
GLIB_CFLAGS = -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
HTH
 
1 members found this post helpful.
Old 09-05-2015, 12:30 AM   #3
apreston
LQ Newbie
 
Registered: Sep 2002
Location: Calgary, Alberta, Canada
Distribution: Kubuntu x86-64 15.04
Posts: 22

Original Poster
Rep: Reputation: 0
running the first code produces:

$ pkg-config --cflags glib-2.0
-I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include
$ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
bash: -I/usr/include/glib-2.0: No such file or directory

However, /usr/include/glib-2.0 does exist. And most of the relevant files are under /usr, not /usr/local. BTW, that was after I used configure with the --prefix=/usr flag

In the makefile I have at line 400:

GLIB_CFLAGS = -pthread -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include

A lot of other flags are pointing to /usr/local instead of /usr. For example,

GIMP_CFLAGS = -I/usr/local/include/gimp-2.0 -I/usr/local/include/gio-unix-2.0/ (etc...)
when gimp-2.0 and gio-unix-2.0 etc are in /usr/include

I have no idea why configure seems to have ignored the prefix flag
 
Old 09-05-2015, 03:22 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,848

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
see man pkg-config, it will not set anything for you, but "used to retrieve information about installed libraries in the system"
-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include are not commands but flags to be used with a compiler.
The --prefix=/usr of configure is not used to specify those (include) directories. Check configure --help about the available options

I would say you need to rerun configure and probably show us the logfile created.
 
1 members found this post helpful.
Old 09-05-2015, 07:19 PM   #5
apreston
LQ Newbie
 
Registered: Sep 2002
Location: Calgary, Alberta, Canada
Distribution: Kubuntu x86-64 15.04
Posts: 22

Original Poster
Rep: Reputation: 0
config.log

After running ./configure again, I get the attached config.log file.

When I run make after that, I get:

$ make
make all-recursive
make[1]: Entering directory '/home/alastair/downloads/ufraw-0.22'
Making all in po
make[2]: Entering directory '/home/alastair/downloads/ufraw-0.22/po'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/alastair/downloads/ufraw-0.22/po'
Making all in icons
make[2]: Entering directory '/home/alastair/downloads/ufraw-0.22/icons'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/alastair/downloads/ufraw-0.22/icons'
make[2]: Entering directory '/home/alastair/downloads/ufraw-0.22'
CXX dcraw.o
dcraw.cc:98:60: fatal error: glib/gi18n.h: No such file or directory
#include <glib/gi18n.h> /*For _(String) definition - NKBJ*/
^
compilation terminated.
Makefile:886: recipe for target 'dcraw.o' failed
make[2]: *** [dcraw.o] Error 1
make[2]: Leaving directory '/home/alastair/downloads/ufraw-0.22'
Makefile:1026: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/alastair/downloads/ufraw-0.22'
Makefile:581: recipe for target 'all' failed
make: *** [all] Error 2

locate found the file gi18n.h on my system at /usr/include/glib-2.0/glib/gi18n.h and at /usr/src/glib-2.19.0/glib/gi18n.h
Attached Files
File Type: log config.log (41.4 KB, 11 views)

Last edited by apreston; 09-05-2015 at 07:55 PM. Reason: added information
 
Old 09-06-2015, 04:22 AM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,848

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
it looks like a lot of variables were cached, so configure "remembered" some previous values. You need to remove the cache file first - or download the source tarball again and start over.
 
1 members found this post helpful.
Old 09-06-2015, 09:43 AM   #7
norobro
Member
 
Registered: Feb 2006
Distribution: Debian Sid
Posts: 792

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
I'm confused as to why pkg-config is pointing to "/usr/local".

I don't know if I'm looking at the correct version of glib for your dist (libglib2.0-dev_2.44.0-1ubuntu3_amd64.deb) but the install files should be similar.

The package "glib-2.0.pc" file points to "/usr" which AFAIK is the standard location:
Code:
prefix=/usr
exec_prefix=${prefix}
libdir=${prefix}/lib/x86_64-linux-gnu
includedir=${prefix}/include

. . .

Name: GLib
Description: C Utility Library
Version: 2.44.0
Requires.private: libpcre
Libs: -L${libdir} -lglib-2.0 
Libs.private: -pthread  -lpcre     
Cflags: -I${includedir}/glib-2.0 -I${libdir}/glib-2.0/include
Have you compilled glib yourself in the past and installed it in "/usr/local"?
Could there be two "glib-2.0.pc" files on your machine? Please post the output of:
Code:
$ locate glib-2.0.pc
 
1 members found this post helpful.
Old 09-06-2015, 03:37 PM   #8
apreston
LQ Newbie
 
Registered: Sep 2002
Location: Calgary, Alberta, Canada
Distribution: Kubuntu x86-64 15.04
Posts: 22

Original Poster
Rep: Reputation: 0
Looks like my last reply got lost somewhere.

Installed version of glib is libglib2.0-dev_2.44.1-1ubuntu1_amd64.deb

locate glib2.0.pc showed 3 copies present:
$ locate glib-2.0.pc
/home/alastair/.wine/drive_c/Program Files/Mono-2.10.9/lib/pkgconfig/glib-2.0.pc
/usr/lib/x86_64-linux-gnu/pkgconfig/glib-2.0.pc
/usr/local/lib/pkgconfig/glib-2.0.pc

the first appears to be specific to Mono under wine
the last was in with a bunch of *.pc files from 2008, so although I don't recall compiling glib myself, I may have, or something else pulled it in. I deleted all those old files and the cache file pan64 suggested. make now completes as does sudo make install.

ufraw now seems to be working although my Nikon D5300 still doesn't appear on the camera list despite the ufraw website stating that it should be. Some of my other software still doesn't import the raw files properly, so I may have to look at dcraw itself. Thanks for your help!
 
Old 09-07-2015, 01:48 AM   #9
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,848

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
glad to hear ufraw is now working.
what do you mean by "my Nikon D5300 still doesn't appear on the camera list"?
 
Old 09-08-2015, 12:53 AM   #10
apreston
LQ Newbie
 
Registered: Sep 2002
Location: Calgary, Alberta, Canada
Distribution: Kubuntu x86-64 15.04
Posts: 22

Original Poster
Rep: Reputation: 0
When you open a raw photo file with ufraw, you can click on a little lens icon to load particulars of the camera and lens used.

Supposedly one can select the camera model from a pop-up list, and then identify the lens so that ufraw can apply distortion corrections. Despite the fact that ufraw 0.22 is supposed to now support the D5300, it does not appear on the list, and the program tries to select the wrong lenses. That's an issue quite seperate from the compile problems I was having, and one that I should probably take up with the ufraw developers. It is, however, the reason I was trying to compile ufraw 0.22 in the first place - it claims to support several more cameras than the versions in the repositories.

As an aside, it turns out that part of the problem that led to my compile attempts has nothing to do with ufraw per se, but with dcraw, which ufraw uses to do the initial load of the picture files. The D5300 can save images at either 12-bit or 14-bit colour depth. I found a reference that stated that dcraw mishandles the D5300's 12-bit files, but works fine with it's 14-bit files, and that that issue is being worked on. I've reset my camera accordingly, and ufraw is now importing the images correctly.
 
Old 09-08-2015, 03:05 AM   #11
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,848

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
I see. Thanks for the explanation.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] If I compile from source on 64 bit system will the compiled program be 64 bit? SharpyWarpy Linux - Software 3 08-14-2012 02:59 PM
Can't compile wxPython Slackbuild in 32-bit (but works fine for 64-bit) Eldarby Linux - Software 7 07-29-2012 12:00 PM
Unable to compile 64 bit kernel on 64 bit machine even after successful compilation. atulsdeshmukh Linux - Kernel 2 09-18-2009 02:28 AM
32-bit Opera doesn't want to work in 64-Bit Kubuntu Lordandmaker Ubuntu 1 02-03-2007 06:57 PM
no KDE in Kubuntu 6.10 64-bit(ATI X800 GTO 256 bit DDr3) exul182 Linux - Hardware 2 01-04-2007 02:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration