Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails if EXIV2_ENABLE_BUILD_PO=TRUE #14

Closed
Vogtinator opened this issue Jul 3, 2017 · 10 comments
Closed

Build fails if EXIV2_ENABLE_BUILD_PO=TRUE #14

Vogtinator opened this issue Jul 3, 2017 · 10 comments

Comments

@Vogtinator
Copy link
Contributor

It looks like it tries to generate a file that does not make sense:

cd exiv2/exiv2-trunk/po && /usr/bin/msgmerge exiv2/exiv2-trunk/po/.po exiv2/exiv2-trunk/po/exiv2.pot
/usr/bin/msgmerge: error while opening "exiv2/exiv2-trunk/po/.po" for reading: No such file or directory
make[2]: *** [po/CMakeFiles/update_translations_exiv2.dir/build.make:93: po/.po] Error 1
@clanmills
Copy link
Collaborator

I've never looked at this. I have to confess that localisation is a total mystery to me. There is a switch EXIV2_ENABLE_NLS to deal with "Natural Language Something". I usually keep that off! I'll have a look at this.

@clanmills
Copy link
Collaborator

clanmills commented Jul 3, 2017

I can't reproduce this, even with a fresh $ git clone https://github.com/exiv2/exiv2

It looks to me as though you trying to execute msgmerge on non-existent *.po files. I've tried $ rm -rf <exiv2dir>/po/*.po and that does NOT reproduce the behaviour you describe.

May I ask you to try a fresh git clone and send me a longer transcript of the issue.

589 rmills@rmillsmbp:~/gnu/git $ del exiv2
590 rmills@rmillsmbp:~/gnu/git $ git clone https://github.com/Exiv2/exiv2
Cloning into 'exiv2'...
remote: Counting objects: 30655, done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 30655 (delta 1), reused 5 (delta 1), pack-reused 30646
Receiving objects: 100% (30655/30655), 82.27 MiB | 5.52 MiB/s, done.
Resolving deltas: 100% (23098/23098), done.
591 rmills@rmillsmbp:~/gnu/git $ ls exiv2/po
CMakeLists.txt	Makefile.in.in	Rules-quot    de.po		  es.po      fr.po		ms.po  quot.sed		    sk.po  uk.po
ChangeLog	Makevars	boldquot.sed  en@boldquot.header  exiv2.pot  gl.po		pl.po  remove-potcdate.sin  sv.po  vi.po
LINGUAS		POTFILES.in	bs.po	      en@quot.header	  fi.po      insert-header.sin	pt.po  ru.po		    ug.po
592 rmills@rmillsmbp:~/gnu/git $ mkdir exiv2/build
593 rmills@rmillsmbp:~/gnu/git $ cd exiv2/build
594 rmills@rmillsmbp:~/gnu/git/exiv2/build $ cmake .. -DEXIV2_ENABLE_BUILD_PO=TRUE
-- The C compiler identification is AppleClang 8.1.0.8020042
-- The CXX compiler identification is AppleClang 8.1.0.8020042

...
-- Looking for vprintf - found
-- None:              
-- Debug:             -g
-- Release:           -O3 -DNDEBUG
-- RelWithDebInfo:    -O2 -g -DNDEBUG
-- MinSizeRel:        -Os -DNDEBUG
-- Looking for _Bool
-- Looking for _Bool - not found
-- Performing Test TM_IN_SYS_TIME
-- Performing Test TM_IN_SYS_TIME - Success
-- Performing Test STRERROR_R_CHAR_P
-- Performing Test STRERROR_R_CHAR_P - Success
-- Performing Test TIME_WITH_SYS_TIME
-- Performing Test TIME_WITH_SYS_TIME - Success
-- ------------------------------------------------------------------
-- exiv2 0.26 configure results        <http://www.exiv2.org>
-- Building PNG support:               YES
-- Building shared library:            YES
-- XMP metadata support:               YES
-- Building static libxmp:             YES
-- Native language support:            YES
-- Conversion of Windows XP tags:      YES
-- Nikon lens database:                YES
-- Commercial build:                   NO
-- Build the unit tests:               YES
-- Building translations files:        YES
-- Building video support:             NO
-- Building webready support:          NO
-- ------------------------------------------------------------------
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/rmills/gnu/git/exiv2/build
595 rmills@rmillsmbp:~/gnu/git/exiv2/build $ make
Scanning dependencies of target xmp
[  0%] Building CXX object xmpsdk/CMakeFiles/xmp.dir/src/ExpatAdapter.cpp.o
...
[  8%] Built target xmp
Scanning dependencies of target exiv2lib
[  9%] Building CXX object src/CMakeFiles/exiv2lib.dir/asfvideo.cpp.o
...
[ 38%] Building CXX object src/CMakeFiles/exiv2lib.dir/pngimage.cpp.o
[ 39%] Linking CXX shared library libexiv2.dylib
[ 39%] Built target exiv2lib
...
Scanning dependencies of target translationsexiv2
[ 77%] Generating bs.gmo
[ 77%] Generating de.gmo
[ 78%] Generating es.gmo
[ 78%] Generating fi.gmo
[ 79%] Generating fr.gmo
[ 79%] Generating gl.gmo
[ 80%] Generating ms.gmo
[ 80%] Generating pl.gmo
[ 81%] Generating pt.gmo
[ 81%] Generating ru.gmo
[ 82%] Generating sk.gmo
[ 83%] Generating sv.gmo
[ 83%] Generating ug.gmo
[ 84%] Generating uk.gmo
[ 84%] Generating vi.gmo
[ 92%] Built target translationsexiv2
Scanning dependencies of target update_translations_exiv2
[100%] Built target update_translations_exiv2
596 rmills@rmillsmbp:~/gnu/git/exiv2/build $

@Vogtinator
Copy link
Contributor Author

I used the exiv-v0.26-trunk.tar.gz archives for building, maybe you can reproduce it that way?

@clanmills
Copy link
Collaborator

Right. I'm on the same page although I can't reproduce the po file grumbles.

There is an issue with how the released code and handles LIBINTL. This issue causes link failures in the the library and the exiv2(.exe) application. Changes are required in config/CMakeChecks.txt and src/CMakeLists.txt to fix this. In the past, I've always built with -DEXIV2_ENABLE_NLS=FALSE I received a patch recently which repaired ENABLE_NLS and that's what you'll need.

Can you look in /po. Here's what I have:

565 rmills@rmillsmbp:~/Downloads/exiv2-trunk $ ls -alt po
total 11472
drwxr-xr-x+ 26 rmills staff    884 Jul  3 20:43 ..
drwxr-xr-x+ 31 rmills staff   1054 Jul  3 20:43 .
-rw-r--r--+  1 rmills staff 770762 Mar 21 21:12 bs.po
-rw-r--r--+  1 rmills staff 740931 Mar 21 21:12 de.po
-rw-r--r--+  1 rmills staff 797494 Mar 21 21:12 es.po
-rw-r--r--+  1 rmills staff 577869 Mar 21 21:12 exiv2.pot
-rw-r--r--+  1 rmills staff 619946 Mar 21 21:12 fi.po
-rw-r--r--+  1 rmills staff 697585 Mar 21 21:12 fr.po
-rw-r--r--+  1 rmills staff 757713 Mar 21 21:12 gl.po
-rw-r--r--+  1 rmills staff 783876 Mar 21 21:12 ms.po
-rw-r--r--+  1 rmills staff 731692 Mar 21 21:12 pl.po
-rw-r--r--+  1 rmills staff 741487 Mar 21 21:12 pt.po
-rw-r--r--+  1 rmills staff 753206 Mar 21 21:12 ru.po
-rw-r--r--+  1 rmills staff 721986 Mar 21 21:12 sk.po
-rw-r--r--+  1 rmills staff 826941 Mar 21 21:12 sv.po
-rw-r--r--+  1 rmills staff 707250 Mar 21 21:12 ug.po
-rw-r--r--+  1 rmills staff 751989 Mar 21 21:12 uk.po
-rw-r--r--+  1 rmills staff 671323 Mar 21 21:12 vi.po
-rw-r--r--+  1 rmills staff    492 Aug 17  2016 POTFILES.in
-rw-r--r--+  1 rmills staff     76 May 10  2015 LINGUAS
-rw-r--r--+  1 rmills staff  13298 Dec 25  2014 Makefile.in.in
-rw-r--r--+  1 rmills staff   1415 Oct 19  2012 CMakeLists.txt
-rw-r--r--+  1 rmills staff    478 Oct 31  2006 ChangeLog
-rw-r--r--+  1 rmills staff   1806 Oct 31  2006 Makevars
-rw-r--r--+  1 rmills staff   1790 Oct 31  2006 Rules-quot
-rw-r--r--+  1 rmills staff    217 Oct 31  2006 boldquot.sed
-rw-r--r--+  1 rmills staff   1337 Oct 31  2006 en@boldquot.header
-rw-r--r--+  1 rmills staff   1203 Oct 31  2006 en@quot.header
-rw-r--r--+  1 rmills staff    672 Oct 31  2006 insert-header.sin
-rw-r--r--+  1 rmills staff    153 Oct 31  2006 quot.sed
-rw-r--r--+  1 rmills staff    432 Oct 31  2006 remove-potcdate.sin
566 rmills@rmillsmbp:~/Downloads/exiv2-trunk $ 

@Vogtinator
Copy link
Contributor Author

Looks like I've got some more files under po, looks OSX specific:

> ls -alt po
total 11596
drwxr-xr-x 13 fvogt suse   4096 Jul  3 22:45 ..
drwxr-xr-x  2 fvogt suse   4096 Jul  3 22:45 .
-rw-r--r--  1 fvogt suse    246 Mar 21 22:12 ._bs.po
-rw-r--r--  1 fvogt suse    246 Mar 21 22:12 ._de.po
-rw-r--r--  1 fvogt suse    246 Mar 21 22:12 ._es.po
-rw-r--r--  1 fvogt suse    246 Mar 21 22:12 ._exiv2.pot
-rw-r--r--  1 fvogt suse    246 Mar 21 22:12 ._fi.po
-rw-r--r--  1 fvogt suse    246 Mar 21 22:12 ._fr.po
-rw-r--r--  1 fvogt suse    246 Mar 21 22:12 ._gl.po
-rw-r--r--  1 fvogt suse    246 Mar 21 22:12 ._ms.po
-rw-r--r--  1 fvogt suse    246 Mar 21 22:12 ._pl.po
-rw-r--r--  1 fvogt suse    246 Mar 21 22:12 ._pt.po
-rw-r--r--  1 fvogt suse    246 Mar 21 22:12 ._ru.po
-rw-r--r--  1 fvogt suse    246 Mar 21 22:12 ._sk.po
-rw-r--r--  1 fvogt suse    246 Mar 21 22:12 ._sv.po
-rw-r--r--  1 fvogt suse    246 Mar 21 22:12 ._ug.po
-rw-r--r--  1 fvogt suse    246 Mar 21 22:12 ._uk.po
-rw-r--r--  1 fvogt suse    246 Mar 21 22:12 ._vi.po
-rw-r--r--  1 fvogt suse 770762 Mar 21 22:12 bs.po
-rw-r--r--  1 fvogt suse 740931 Mar 21 22:12 de.po
-rw-r--r--  1 fvogt suse 797494 Mar 21 22:12 es.po
-rw-r--r--  1 fvogt suse 577869 Mar 21 22:12 exiv2.pot
-rw-r--r--  1 fvogt suse 619946 Mar 21 22:12 fi.po
-rw-r--r--  1 fvogt suse 697585 Mar 21 22:12 fr.po
-rw-r--r--  1 fvogt suse 757713 Mar 21 22:12 gl.po
-rw-r--r--  1 fvogt suse 783876 Mar 21 22:12 ms.po
-rw-r--r--  1 fvogt suse 731692 Mar 21 22:12 pl.po
-rw-r--r--  1 fvogt suse 741487 Mar 21 22:12 pt.po
-rw-r--r--  1 fvogt suse 753206 Mar 21 22:12 ru.po
-rw-r--r--  1 fvogt suse 721986 Mar 21 22:12 sk.po
-rw-r--r--  1 fvogt suse 826941 Mar 21 22:12 sv.po
-rw-r--r--  1 fvogt suse 707250 Mar 21 22:12 ug.po
-rw-r--r--  1 fvogt suse 751989 Mar 21 22:12 uk.po
-rw-r--r--  1 fvogt suse 671323 Mar 21 22:12 vi.po
-rw-r--r--  1 fvogt suse    246 Aug 17  2016 ._POTFILES.in
-rw-r--r--  1 fvogt suse    492 Aug 17  2016 POTFILES.in
-rw-r--r--  1 fvogt suse    246 May 10  2015 ._LINGUAS
-rw-r--r--  1 fvogt suse     76 May 10  2015 LINGUAS
-rw-r--r--  1 fvogt suse    246 Dec 25  2014 ._Makefile.in.in
-rw-r--r--  1 fvogt suse  13298 Dec 25  2014 Makefile.in.in
-rw-r--r--  1 fvogt suse    246 Oct 19  2012 ._CMakeLists.txt
-rw-r--r--  1 fvogt suse   1415 Oct 19  2012 CMakeLists.txt
-rw-r--r--  1 fvogt suse    246 Oct 31  2006 ._ChangeLog
-rw-r--r--  1 fvogt suse    246 Oct 31  2006 ._Makevars
-rw-r--r--  1 fvogt suse    246 Oct 31  2006 ._Rules-quot
-rw-r--r--  1 fvogt suse    246 Oct 31  2006 ._boldquot.sed
-rw-r--r--  1 fvogt suse    246 Oct 31  2006 ._en@boldquot.header
-rw-r--r--  1 fvogt suse    246 Oct 31  2006 ._en@quot.header
-rw-r--r--  1 fvogt suse    246 Oct 31  2006 ._insert-header.sin
-rw-r--r--  1 fvogt suse    246 Oct 31  2006 ._quot.sed
-rw-r--r--  1 fvogt suse    246 Oct 31  2006 ._remove-potcdate.sin
-rw-r--r--  1 fvogt suse    478 Oct 31  2006 ChangeLog
-rw-r--r--  1 fvogt suse   1806 Oct 31  2006 Makevars
-rw-r--r--  1 fvogt suse   1790 Oct 31  2006 Rules-quot
-rw-r--r--  1 fvogt suse    217 Oct 31  2006 boldquot.sed
-rw-r--r--  1 fvogt suse   1337 Oct 31  2006 en@boldquot.header
-rw-r--r--  1 fvogt suse   1203 Oct 31  2006 en@quot.header
-rw-r--r--  1 fvogt suse    672 Oct 31  2006 insert-header.sin
-rw-r--r--  1 fvogt suse    153 Oct 31  2006 quot.sed
-rw-r--r--  1 fvogt suse    432 Oct 31  2006 remove-potcdate.sin
> cmake -DEXIV2_ENABLE_BUILD_PO:BOOL=TRUE
[...]
-- ------------------------------------------------------------------
-- exiv2 0.26 configure results        <http://www.exiv2.org>
-- Building PNG support:               YES
-- Building shared library:            YES
-- XMP metadata support:               YES
-- Building static libxmp:             YES
-- Native language support:            YES
-- Conversion of Windows XP tags:      YES
-- Nikon lens database:                YES
-- Commercial build:                   NO
-- Build the unit tests:               YES
-- Building translations files:        YES
-- Building video support:             NO
-- Building webready support:          NO
-- ------------------------------------------------------------------
[...]
> make -j8
Scanning dependencies of target xmp
Scanning dependencies of target translationsexiv2
Scanning dependencies of target update_translations_exiv2
[  0%] Generating fr.gmo
[  1%] Generating de.gmo
[  2%] Generating .po
[  3%] Generating fi.gmo
[...]

@Vogtinator
Copy link
Contributor Author

Indeed, that was it, rm po/._* makes it work fine.

@clanmills
Copy link
Collaborator

Holly crap. These horrid _* files have been put there by Apple's version of tar. I think they hold extended file attributes used by the Apple file system. When I untar the bundle on the Mac, I don't see them because Apple swallow them back into the filesystem. Crap, crap, crap. I had totally forgotten about that behaviour of Apple's tar. This has caused me heartache on clanmills.com for reasons we will not discuss. And of course, as they are .files, they're hidden by default on Linux.

I will fix the buildserver to create "pure" tars which don't have those hidden idiotic files. https://superuser.com/questions/61185/why-do-i-get-files-like-foo-in-my-tarball-on-os-x

Perhaps I should think about fixing the published bundles.

Looks like the 0.26.1 dot release is becoming urgent.

@clanmills
Copy link
Collaborator

I've committed the fix for the buildserver. I'm not going to do anything instantly about the released bundles. I'm going hill walking tomorrow morning and I'll think about this (and then probably fix them tomorrow afternoon).

Can you help me with GitHub? I know from the git log that the patch concerning LIBINTL is #8. However I can't locate #8. Do you have any idea where it's hiding?

@Vogtinator
Copy link
Contributor Author

I've committed the fix for the buildserver. I'm not going to do anything instantly about the released bundles. I'm going hill walking tomorrow morning and I'll think about this (and then probably fix them tomorrow afternoon).

That's fine for me, the workaround is pretty simple anyway.

Can you help me with GitHub? I know from the git log that the patch concerning LIBINTL is #8. However I can't locate #8. Do you have any idea where it's hiding?

There are two commits, 88cf586 and 15e0b90.

@clanmills
Copy link
Collaborator

I've fixed the source download archive exiv2-0.26-trunk.tar.gz on this page: http://www.exiv2.org/download.html

I've updated the file size and md5sum. I did this manually on Linux by extracting exiv2-trunk from the archive, removing the ._mumble files and used tar cxf exiv2-0.26-trunk.tar.gz exiv2-trunk to recreate the archive. No files in the archive have been modified. I have downloaded and build the modified archive on macosx. The test suite runs without errors.

I've inspected the archives for cygwin, mingw, msvc, linux, and macosx. Because the archives were created on their own platform, only macosx has ._mumble files . This is acceptable as the archive is intended for use on MacOSX.

I have verified that the command prefix COPYFILE_DISABLE=1 tar cxf ... in contrib/buildserver/dailyCMake.sh has been effective in no long generating ._mumble files on the daily build. I've added the COPYFILE_DISABLE=1 prefix to other tar cxf commands in website/buildrelease.sh which is the principal script responsible for building the web site. See website/Checklist.txt for more information about the release procedure.

Finally, as we don't distribute the test directory in the source archive, I copied it from my current copy of master. When I ran the test suite, the validity of the change to test/data/preview/preview-test.out yesterday in support of #16 was confirmed. I'm going to reward myself with a cup of coffee.

I'm going to now give attention to CMake/MSVC/static external libraries #11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants