baldipsinghkohli / papercrop

Automatically exported from code.google.com/p/papercrop
GNU General Public License v2.0
0 stars 0 forks source link

Error at linking CXX executable paperCrop #18

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I am trying to compile the app on Fedora 13.

[alec@localhost ~]$ uname -a
Linux localhost.localdomain 2.6.34.7-56.fc13.x86_64 #1 SMP Wed Sep 15 03:36:55 
UTC 2010 x86_64 x86_64 x86_64 GNU/Linux

I have edited the installer file to suit Fedora 13 environment.

Please see fedora_installer.sh.

The compilation runs ok but the final stage shows:

[100%] Building CXX object CMakeFiles/paperCrop.dir/utility/TextFile.cpp.o      

Linking CXX executable paperCrop                                                

/usr/bin/ld: 
/usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64/libfltk.so: undefined 
reference to symbol 'FcPatternAddInteger'
/usr/bin/ld: note: 'FcPatternAddInteger' is defined in DSO 
/usr/lib64/libfontconfig.so.1 so try adding it to the linker command line
/usr/lib64/libfontconfig.so.1: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[2]: *** [paperCrop] Error 1
make[1]: *** [CMakeFiles/paperCrop.dir/all] Error 2
make: *** [all] Error 2

Please help with fixing the issue.

Original issue reported on code.google.com by rational...@gmail.com on 21 Jun 2011 at 7:17

Attachments:

GoogleCodeExporter commented 8 years ago
This seems to be related. It is said that redhat comes with an outdated 
fontconfig library. It's difficult to believe that OS-supplied libraries have 
version conflict though. 
http://stackoverflow.com/questions/2480410/how-can-i-update-fontconfig-to-a-newe
r-version-in-red-hat-5-3

They suggest this, but I am not sure if this is safe operation or not.
{{{
cd /usr/src
wget http://fontconfig.org/release/fontconfig-2.4.2.tar.gz
tar -zxf fontconfig-2.4.2.tar.gz
cd fontconfig-2.4.2
./configure -prefix=/usr
make
make install <- Run as root or use sudo
}}}

Original comment by taesoob...@gmail.com on 21 Jun 2011 at 1:09

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I would first make sure if developer version of fontconfig is installed 
properly before try the above suggesion.

Original comment by taesoob...@gmail.com on 21 Jun 2011 at 1:11

GoogleCodeExporter commented 8 years ago
Could you also try to include all FLTK libs to the project?
: like below
if(UNIX)

  target_link_libraries(paperCrop
        fltk_images
    fltk_forms
        fltk_gl
        GL
    fltk

Original comment by taesoob...@gmail.com on 21 Jun 2011 at 1:19

GoogleCodeExporter commented 8 years ago
fontconfig is the latest version (2.8.0-1) and installed with no conflicts with 
yum...

[alec@localhost ~]$ rpm -aq|grep fontconfig
mingw32-fontconfig-2.6.0-10.fc12.noarch
fontconfig-2.8.0-1.fc13.i686
fontconfig-devel-2.8.0-1.fc13.x86_64
fontconfig-2.8.0-1.fc13.x86_64

Original comment by rational...@gmail.com on 21 Jun 2011 at 1:27

GoogleCodeExporter commented 8 years ago
Added 

fltk_forms
fltk_gl
GL

same result...

Original comment by rational...@gmail.com on 21 Jun 2011 at 1:58

GoogleCodeExporter commented 8 years ago
Could you try again using the lastest svn? (after "svn revert .;svn up")

Original comment by taesoob...@gmail.com on 22 Jun 2011 at 12:08

GoogleCodeExporter commented 8 years ago
Same:

[100%] Building CXX object CMakeFiles/paperCrop.dir/utility/TextFile.cpp.o      

Linking CXX executable paperCrop                                                

/usr/bin/ld: 
/usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64/libfltk.so: undefined 
reference to symbol 'FcPatternAddInteger'                                       

/usr/bin/ld: note: 'FcPatternAddInteger' is defined in DSO 
/usr/lib64/libfontconfig.so.1 so try adding it to the linker command line
/usr/lib64/libfontconfig.so.1: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[2]: *** [paperCrop] Error 1
make[1]: *** [CMakeFiles/paperCrop.dir/all] Error 2
make: *** [all] Error 2

Original comment by rational...@gmail.com on 22 Jun 2011 at 4:38

GoogleCodeExporter commented 8 years ago
I am sorry but could you try again using the lastest svn? (after "svn revert 
.;svn up") If this doesn't work, please try rearranging library orders, and if 
that doesn't work, I think you may have to build fltk from source codes. I 
could try installing fedora here but it may take some time because I am rather 
too busy these days. 

Original comment by taesoob...@gmail.com on 22 Jun 2011 at 1:25

GoogleCodeExporter commented 8 years ago
Will try a couple of hours later today and write here...

Original comment by rational...@gmail.com on 22 Jun 2011 at 1:37

GoogleCodeExporter commented 8 years ago
Same stuff, plz see with configure output.

INCDIR=/usr/local/include
LIBDIR=/usr/local/lib
CC=gcc
PREFIX=/usr/local

possibly should autodetect on Fedora X86_64

INCDIR=/usr/include
LIBDIR=/usr/lib64
CC=gcc
PREFIX=/usr

?

Original comment by rational...@gmail.com on 22 Jun 2011 at 5:07

Attachments:

GoogleCodeExporter commented 8 years ago
Could you please try again using the latest svn? I changed papercrop to use 
system installed poppler lib.

Original comment by taesoob...@gmail.com on 23 Jun 2011 at 5:15

GoogleCodeExporter commented 8 years ago
Now the error message changes:

[100%] Building CXX object CMakeFiles/paperCrop.dir/utility/TextFile.cpp.o      

Linking CXX executable paperCrop                                                

/usr/bin/ld: CMakeFiles/paperCrop.dir/image/ImageProcessor.cpp.o: undefined 
reference to symbol 'ilOverlayImage'                                            

/usr/bin/ld: note: 'ilOverlayImage' is defined in DSO /usr/lib64/libIL.so.1 so 
try adding it to the linker command line
/usr/lib64/libIL.so.1: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[2]: *** [paperCrop] Error 1
make[1]: *** [CMakeFiles/paperCrop.dir/all] Error 2
make: *** [all] Error 2

Original comment by rational...@gmail.com on 23 Jun 2011 at 5:27

Attachments:

GoogleCodeExporter commented 8 years ago
Could you please try again using the latest svn?

Original comment by taesoob...@gmail.com on 23 Jun 2011 at 12:05

GoogleCodeExporter commented 8 years ago
Same:

[100%] Building CXX object CMakeFiles/paperCrop.dir/utility/TextFile.cpp.o      

Linking CXX executable paperCrop                                                

/usr/bin/ld: CMakeFiles/paperCrop.dir/image/ImageProcessor.cpp.o: undefined 
reference to symbol 'ilOverlayImage'                                            

/usr/bin/ld: note: 'ilOverlayImage' is defined in DSO /usr/lib64/libIL.so.1 so 
try adding it to the linker command line
/usr/lib64/libIL.so.1: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[2]: *** [paperCrop] Error 1
make[1]: *** [CMakeFiles/paperCrop.dir/all] Error 2
make: *** [all] Error 2

Original comment by rational...@gmail.com on 23 Jun 2011 at 12:41

Attachments:

GoogleCodeExporter commented 8 years ago
Sorry, could you try again please?

Original comment by taesoob...@gmail.com on 23 Jun 2011 at 1:12

GoogleCodeExporter commented 8 years ago
Great! It compiles.

However, the gui is missing UTF8 support, please see the attached file.

Will be exploring for more issues.

Original comment by rational...@gmail.com on 23 Jun 2011 at 1:25

Attachments:

GoogleCodeExporter commented 8 years ago
Great! UTF8 problem is a known issue for fltk1.1 branch. Fltk started to 
support utf8 starting from fltk1.3, and I will make transition to fltk1.3 as 
soon as it is supported by ubuntu. See if those files can be accessed through 
the command line or the referencer plugin. 
(command line: cd ~/bin/papercrop/papercrop_source;./paperCrop 
"filename='/home/taesoobear/Documents/가.pdf'")
On the other hand, UTF-8 PDFs are supported if it has english file name (though 
often requires embedded fonts). If it works reasonably well, than please upload 
the install script here so that I can upload. Thanks!

Original comment by taesoob...@gmail.com on 23 Jun 2011 at 1:46

GoogleCodeExporter commented 8 years ago
Just implemented a quick work-around which uses python native file chooser. 

Original comment by taesoob...@gmail.com on 23 Jun 2011 at 2:07

GoogleCodeExporter commented 8 years ago
Yes, it is operational. I will send more feedback when I spend more time with 
it. 

Attaching fedora installer.

Original comment by rational...@gmail.com on 23 Jun 2011 at 2:22

Attachments:

GoogleCodeExporter commented 8 years ago
The fedora installer's missing poppler-dev. What's the package name there?

Original comment by taesoob...@gmail.com on 23 Jun 2011 at 3:23

GoogleCodeExporter commented 8 years ago
poppler-devel

However:
[alec@localhost ~]$ rpm -aq|grep  poppler
poppler-utils-0.12.4-6.fc13.x86_64
poppler-data-0.4.2-1.fc13.noarch
poppler-glib-0.12.4-6.fc13.x86_64
poppler-qt4-0.12.4-6.fc13.x86_64
poppler-0.12.4-6.fc13.x86_64
poppler-devel-0.12.4-6.fc13.x86_64

Original comment by rational...@gmail.com on 23 Jun 2011 at 3:49

GoogleCodeExporter commented 8 years ago

Original comment by taesoob...@gmail.com on 4 Aug 2011 at 3:22