IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Déploiement/Installation Python Discussion :

PB install py3exiv2 [Python 3.X]


Sujet :

Déploiement/Installation Python

  1. #1
    Membre à l'essai
    Homme Profil pro
    Consultant informatique
    Inscrit en
    Juin 2013
    Messages
    20
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Consultant informatique
    Secteur : Administration - Collectivité locale

    Informations forums :
    Inscription : Juin 2013
    Messages : 20
    Points : 11
    Points
    11
    Par défaut PB install py3exiv2
    Sur un macbook vaec tous les logiciels à jours
    exiv2 iest installé avec 'port' (macport)

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
     
    $ type python3
    python3 is /Library/Frameworks/Python.framework/Versions/3.7/bin/python3
    $ port list installed | grep exiv2
    Warning: The 'list' action only shows the currently available version of each port. To see installed versions, use the 'installed' action.
    exiv2                          @0.27           graphics/exiv2
    $ type exiv2
    exiv2 is /opt/local/bin/exiv2
    $ ls /opt/local/lib/libexiv*
    /opt/local/lib/libexiv2.0.27.0.dylib /opt/local/lib/libexiv2.27.dylib     /opt/local/lib/libexiv2.dylib
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
     
    root# pip install py3exiv2
    Collecting py3exiv2
      Downloading https://files.pythonhosted.org/packages/95/e3/d43f8635d85074f1e128ca42b7abda7655eb10d592081625f6125b72d356/py3exiv2-0.4.0.tar.gz
    Installing collected packages: py3exiv2
      Running setup.py install for py3exiv2 ... error
        Complete output from command /Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-install-b5mg391w/py3exiv2/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/tmp/pip-record-3686nsgh/install-record.txt --single-version-externally-managed --compile:
        find: /usr/local/lib/: No such file or directory
        running install
        running build
        running build_py
        creating build
        creating build/lib.macosx-10.9-x86_64-3.7
        creating build/lib.macosx-10.9-x86_64-3.7/pyexiv2
        copying src/pyexiv2/preview.py -> build/lib.macosx-10.9-x86_64-3.7/pyexiv2
        copying src/pyexiv2/iptc.py -> build/lib.macosx-10.9-x86_64-3.7/pyexiv2
        copying src/pyexiv2/metadata.py -> build/lib.macosx-10.9-x86_64-3.7/pyexiv2
        copying src/pyexiv2/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/pyexiv2
        copying src/pyexiv2/xmp.py -> build/lib.macosx-10.9-x86_64-3.7/pyexiv2
        copying src/pyexiv2/exif.py -> build/lib.macosx-10.9-x86_64-3.7/pyexiv2
        copying src/pyexiv2/utils.py -> build/lib.macosx-10.9-x86_64-3.7/pyexiv2
        running build_ext
        building 'libexiv2python' extension
        creating build/temp.macosx-10.9-x86_64-3.7
        creating build/temp.macosx-10.9-x86_64-3.7/src
        gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c src/exiv2wrapper.cpp -o build/temp.macosx-10.9-x86_64-3.7/src/exiv2wrapper.o -g
        In file included from src/exiv2wrapper.cpp:27:
        src/exiv2wrapper.hpp:32:10: fatal error: 'exiv2/image.hpp' file not found
        #include "exiv2/image.hpp"
                 ^~~~~~~~~~~~~~~~~
        1 error generated.
        error: command 'gcc' failed with exit status 1
     
        ----------------------------------------
    Command "/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-install-b5mg391w/py3exiv2/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/tmp/pip-record-3686nsgh/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-install-b5mg391w/py3exiv2/
    1) la commande find ne peut trouver le répertoire /opt/local/lib où se trouve la librairie libexiv2
    2)J'ai une erreur d'include sur le fichier exiv2/image.hpp'

    Toute aide sera appréciée
    Mzerci

  2. #2
    Expert éminent

    Homme Profil pro
    Inscrit en
    Octobre 2008
    Messages
    4 298
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Belgique

    Informations forums :
    Inscription : Octobre 2008
    Messages : 4 298
    Points : 6 778
    Points
    6 778
    Par défaut
    Salut,

    Théoriquement g++ est censé savoir où trouver les sources/headers des libs.

    Sous Linux ce sera /usr/include/exiv2/image.hpp

    Attention, si tu as installé exiv2 (et je suppose que oui) tu n'as pas installé pour autant le paquet dev qui contient ces fameux headers dont gcc a besoin.

    Sous Linux c'est généralement exiv2-dev pour Debian et exiv2-devel pour les rpm.

    Pour OSX je n'en connais pas le nom, mais je suppose que tu sais où chercher cette info.

    Si tu résous cela, explique-le ici s'il te plait, je mettrai la doc à jour. Merci

  3. #3
    Membre à l'essai
    Homme Profil pro
    Consultant informatique
    Inscrit en
    Juin 2013
    Messages
    20
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Consultant informatique
    Secteur : Administration - Collectivité locale

    Informations forums :
    Inscription : Juin 2013
    Messages : 20
    Points : 11
    Points
    11
    Par défaut
    Merci pour ces informations.
    Mais comme je ne connais pas les arcanes de pip, je voudrais surtout savoir où trouver les scripts afin de les modifier ou de tenir compte de leurs paramètres.
    Cela ne me sert pas à grand chose de récupérer les sources de exiv2 sur leur site, si je ne sais pas où les mettre pour que les scripts de pip, trouvent les fichiers concernés
    A bientôt

  4. #4
    Membre à l'essai
    Homme Profil pro
    Consultant informatique
    Inscrit en
    Juin 2013
    Messages
    20
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Consultant informatique
    Secteur : Administration - Collectivité locale

    Informations forums :
    Inscription : Juin 2013
    Messages : 20
    Points : 11
    Points
    11
    Par défaut
    Bonsoir,
    J'ai téléchargé avec "pip download py3exiv2" le fichier tar.gz et aussi les sources de exiv2.
    J'ai fait une tentative misérable avec
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    ln -s $PWD/exiv2-0.27.0-Source/include/exiv2  /Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m
    ce qui me donne
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
     
     
        gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c src/exiv2wrapper.cpp -o build/temp.macosx-10.9-x86_64-3.7/src/exiv2wrapper.o -g
        In file included from src/exiv2wrapper.cpp:27:
        In file included from src/exiv2wrapper.hpp:32:
        In file included from /Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/exiv2/image.hpp:28:
        In file included from /Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/exiv2/types.hpp:33:
        /Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/exiv2/config.h:36:10: fatal error: 'exv_conf.h' file not found
        #include "exv_conf.h"
                 ^~~~~~~~~~~~
        1 error generated.
        error: command 'gcc' failed with exit status 1
    Bon, on avance ....
    Sauf que le fichier exv_conf.h est inexistant dans les 2 arborescences
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
     
    # find exiv2-0.27.0-Source py3exiv2-0.4.0 -name 'exv_conf.h'
    #
    Une idée ?

  5. #5
    Expert éminent

    Homme Profil pro
    Inscrit en
    Octobre 2008
    Messages
    4 298
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Belgique

    Informations forums :
    Inscription : Octobre 2008
    Messages : 4 298
    Points : 6 778
    Points
    6 778
    Par défaut
    Ta commande gcc me surprend, ce n'est pas celle qui est lancée par build.sh. Cet exécutable est créé par le script configure.py.

    Et ce devrait être g++ à la place de gcc.

    Quoiqu'il en soit, essaye cette procédure:

    https://incoherentmusings.wordpress....iv2-on-macosx/

  6. #6
    Membre à l'essai
    Homme Profil pro
    Consultant informatique
    Inscrit en
    Juin 2013
    Messages
    20
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Consultant informatique
    Secteur : Administration - Collectivité locale

    Informations forums :
    Inscription : Juin 2013
    Messages : 20
    Points : 11
    Points
    11
    Par défaut
    Citation Envoyé par VinsS Voir le message
    Ta commande gcc me surprend, ce n'est pas celle qui est lancée par build.sh. Cet exécutable est créé par le script configure.py.

    Et ce devrait être g++ à la place de gcc.

    Quoiqu'il en soit, essaye cette procédure:

    https://incoherentmusings.wordpress....iv2-on-macosx/

    1) je n'y suis pour rien dans cette commande.... elle vient de pip.
    Il fut un temps où l'on pouvait compiler du c++ avec gcc, il suffisait de donner les bonnes options.
    Donc je n'ai pas été étonné.

    2) sinon, il m'a fallu faire quelques modifications à la liste de commande donnée en exemple car j'ai eu des erreurs :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    $ pip install py3exiv2 –download=”$PWD”
    Invalid requirement: '–download=”\udc80\udc9d'
    = is not a valid operator. Did you mean == ?
    $ pip install py3exiv2 –download=”/Users/jrc/Desktop/tmp/pyexiv.d”
    Invalid requirement: '–download=”/Users/jrc/Desktop/tmp/pyexiv.d”'
    It looks like a path. File '–download=”/Users/jrc/Desktop/tmp/pyexiv.d”' does not exist.
    $ pwd
    /Users/jrc/Desktop/tmp/pyexiv.d
    En fait pip a maintenant une commande download ce qui m'a donné :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    pip download py3exiv2
    tar -zxf py3exiv2-0.4.0.tar.gz 
    curl https://gist.githubusercontent.com/jpadhye/3a8301f85378b769e5956d7eeb963812/raw/8a205b411f27d7b001ef775a5e484dbb15bc1e26/setup.py >setup.py
    tar -czf py3exiv2-0.4.0.tar.gz setup.py
    brew install boost-python3
    brew install gexiv2 pygobject pygobject3
    mais pour la dernière commande :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    $ pip3 install py3exiv2-0.4.0.tar.gz 
    Processing ./py3exiv2-0.4.0.tar.gz
    Could not install packages due to an EnvironmentError: [Errno 21] Is a directory: '/private/var/folders/by/qz__qn5j6nj2prdhwbh3vdvm0000gp/T/pip-req-build-48ohdz2t/'
    Je pense qu'il y a un conflit entre l'installation native sur mac os et le package fourni par python.org et celui venant de homebrew dans /usr/local
    Je continue mes investigations, cela me rappelle ma jeunesse....
    Je vais commencer par désinstaller le python3 de python.org, comme il n'y a pas de uninstall, .. la joie !

  7. #7
    Membre à l'essai
    Homme Profil pro
    Consultant informatique
    Inscrit en
    Juin 2013
    Messages
    20
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Consultant informatique
    Secteur : Administration - Collectivité locale

    Informations forums :
    Inscription : Juin 2013
    Messages : 20
    Points : 11
    Points
    11
    Par défaut Patatras ....
    J'ai supprimé le package de python.org et toutes ses dépendances.
    Partant d'une fresh install de homebrew, j'ai du modifier la liste des commande données dans le lien ci-dessus.
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    mkdir $HOME/Desktop/tmp/pyexiv.d
    cd $HOME/Desktop/tmp/pyexiv.d
    PY3EXIV2=py3exiv2-0.4.0
    brew install boost-python3
    pip3 download py3exiv2
    tar -zxf $PY3EXIV2.tar.gz
    brew install wget
    wget https://gist.githubusercontent.com/jpadhye/3a8301f85378b769e5956d7eeb963812/raw/8a205b411f27d7b001ef775a5e484dbb15bc1e26/setup.py 
    cp setup.py $PY3EXIV2/
    tar -czf $PY3EXIV2.tar.gz $PY3EXIV2
    brew install gexiv2 pygobject pygobject3
    pip3 install $PY3EXIV2.tar.gz
    Tout va bien jusqu'à la dernière commande :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    $ pip3 install $PY3EXIV2.tar.gz 
    Processing ./py3exiv2-0.4.0.tar.gz
        Complete output from command python setup.py egg_info:
        Traceback (most recent call last):
          File "<string>", line 1, in <module>
          File "/private/var/folders/by/qz__qn5j6nj2prdhwbh3vdvm0000gp/T/pip-req-build-p9238msh/setup.py", line 13
            ]
            ^
        SyntaxError: invalid syntax
     
        ----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/by/qz__qn5j6nj2prdhwbh3vdvm0000gp/T/pip-req-build-p9238msh/
    Qu'à cela ne tienne, vi setup.py pour corriger la ligne 13 et enlever ce caractère ] incongru, et on relance ...

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
     
    $ pip3 install $PY3EXIV2.tar.gz 
    Processing ./py3exiv2-0.4.0.tar.gz
    Building wheels for collected packages: py3exiv2
      Running setup.py bdist_wheel for py3exiv2 ... error
      Complete output from command /usr/local/opt/python/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/by/qz__qn5j6nj2prdhwbh3vdvm0000gp/T/pip-req-build-m3an14pe/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /private/var/folders/by/qz__qn5j6nj2prdhwbh3vdvm0000gp/T/pip-wheel-nc8k48wi --python-tag cp37:
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-10.14-x86_64-3.7
      creating build/lib.macosx-10.14-x86_64-3.7/pyexiv2
      copying src/pyexiv2/preview.py -> build/lib.macosx-10.14-x86_64-3.7/pyexiv2
      copying src/pyexiv2/iptc.py -> build/lib.macosx-10.14-x86_64-3.7/pyexiv2
      copying src/pyexiv2/metadata.py -> build/lib.macosx-10.14-x86_64-3.7/pyexiv2
      copying src/pyexiv2/__init__.py -> build/lib.macosx-10.14-x86_64-3.7/pyexiv2
      copying src/pyexiv2/xmp.py -> build/lib.macosx-10.14-x86_64-3.7/pyexiv2
      copying src/pyexiv2/exif.py -> build/lib.macosx-10.14-x86_64-3.7/pyexiv2
      copying src/pyexiv2/utils.py -> build/lib.macosx-10.14-x86_64-3.7/pyexiv2
      running build_ext
      building 'libexiv2python' extension
      creating build/temp.macosx-10.14-x86_64-3.7
      creating build/temp.macosx-10.14-x86_64-3.7/src
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c src/exiv2wrapper.cpp -o build/temp.macosx-10.14-x86_64-3.7/src/exiv2wrapper.o -g
      src/exiv2wrapper.cpp:54:18: error: no matching constructor for initialization of 'Exiv2::Error' (aka 'BasicError<char>')
          Exiv2::Error error(0);
                       ^     ~
      /usr/local/include/exiv2/error.hpp:263:11: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'int' to 'const Exiv2::BasicError<char>' for 1st argument
          class BasicError : public AnyError {
                ^
      /usr/local/include/exiv2/error.hpp:268:18: note: candidate constructor not viable: no known conversion from 'int' to 'Exiv2::ErrorCode' for 1st argument
              explicit BasicError(ErrorCode code);  
    ..... environ une centaine d'autres lignes d'erreur               ^
    Et là je suis bloqué !

    sinon, il y a bien g++ sur mac os :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    # type g++
    g++ is /usr/bin/g++
    Merci pour votre aide ...

  8. #8
    Expert éminent

    Homme Profil pro
    Inscrit en
    Octobre 2008
    Messages
    4 298
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Belgique

    Informations forums :
    Inscription : Octobre 2008
    Messages : 4 298
    Points : 6 778
    Points
    6 778
    Par défaut
    Ça à l'air d'être une idée fixe chez moi mais je reste soupçonneux au sujet de l'usage de gcc.

    Voyons déjà comme ceci, décompresse l'archive ouvre un terminal dedans et lance ces trois commandes
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
     
    g++ -o build/exiv2wrapper.os -c -fPIC -I/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m src/exiv2wrapper.cpp
    g++ -o build/exiv2wrapper_python.os -c -fPIC -I/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m src/exiv2wrapper_python.cpp
    g++ -o build/libexiv2python.so -shared build/exiv2wrapper.os build/exiv2wrapper_python.os -lboost_python3 -lexiv2
    Dans la dernière commande j'ai mis -lboost_python3 qui a peut-être un autre nom chez toi. Dans le setup.py on utilise cette fonction pour rechercher le nom exact.
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
     
    import sys
    import os
    import subprocess
     
    def get_libboost_name():
        """Returns the name of the lib libboost_python 3
     
        """
        # libboost libs are provided without .pc files, so we can't use pkg-config
        places = ('/usr/lib/', '/usr/local/lib/', '/usr/')
        for place in places:
            cmd = ['find', place, '-name', 'libboost_python*']
            rep = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
            if not rep:
                continue
     
            # rep is type bytes
            libs = rep.decode(sys.getfilesystemencoding()).split('\n')
            for l in libs:
                _, l = os.path.split(l)
                if '.so' in l:
                    l = l.split('.so')[0]
                    # Assume there's no longer python2.3 in the wild
                    if '3' in l[2:]:
                        return l.replace('libboost', 'lboost')
    Chez moi ça retourne -lboost_python3-py36

  9. #9
    Membre à l'essai
    Homme Profil pro
    Consultant informatique
    Inscrit en
    Juin 2013
    Messages
    20
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Consultant informatique
    Secteur : Administration - Collectivité locale

    Informations forums :
    Inscription : Juin 2013
    Messages : 20
    Points : 11
    Points
    11
    Par défaut retour sur la première commande g++
    Sinon la première commande retourne ces erreurs :
    Je n'ai pas fait une étude comparative exhaustive, mais il me semble que les erreurs ressemble bien à celle obtenues précédemment (hélas !!!)

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    $ g++ -o build/exiv2wrapper.os -c -fPIC -I/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m src/exiv2wrapper.cpp
    error: unable to open output file 'build/exiv2wrapper.os': 'No such file or directory'
    1 error generated.
    $ mkdir build
    $ g++ -o build/exiv2wrapper.os -c -fPIC -I/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m src/exiv2wrapper.cpp
    src/exiv2wrapper.cpp:54:18: error: no matching constructor for initialization of 'Exiv2::Error' (aka 'BasicError<char>')
        Exiv2::Error error(0);
                     ^     ~
    /usr/local/include/exiv2/error.hpp:263:11: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'int' to
          'const Exiv2::BasicError<char>' for 1st argument
        class BasicError : public AnyError {
              ^
    /usr/local/include/exiv2/error.hpp:268:18: note: candidate constructor not viable: no known conversion from 'int' to 'Exiv2::ErrorCode' for 1st argument
            explicit BasicError(ErrorCode code);
                     ^
    /usr/local/include/exiv2/error.hpp:272:9: note: candidate constructor template not viable: requires 2 arguments, but 1 was provided
            BasicError(ErrorCode code, const A& arg1);
            ^
    /usr/local/include/exiv2/error.hpp:276:9: note: candidate constructor template not viable: requires 3 arguments, but 1 was provided
            BasicError(ErrorCode code, const A& arg1, const B& arg2);
            ^
    /usr/local/include/exiv2/error.hpp:280:9: note: candidate constructor template not viable: requires 4 arguments, but 1 was provided
            BasicError(ErrorCode code, const A& arg1, const B& arg2, const C& arg3);
            ^
    src/exiv2wrapper.cpp:135:18: error: no matching constructor for initialization of 'Exiv2::Error' (aka 'BasicError<char>')
        Exiv2::Error error(0);
                     ^     ~
    /usr/local/include/exiv2/error.hpp:263:11: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'int' to
          'const Exiv2::BasicError<char>' for 1st argument
        class BasicError : public AnyError {
              ^
    /usr/local/include/exiv2/error.hpp:268:18: note: candidate constructor not viable: no known conversion from 'int' to 'Exiv2::ErrorCode' for 1st argument
            explicit BasicError(ErrorCode code);
                     ^
    /usr/local/include/exiv2/error.hpp:272:9: note: candidate constructor template not viable: requires 2 arguments, but 1 was provided
            BasicError(ErrorCode code, const A& arg1);
            ^
    /usr/local/include/exiv2/error.hpp:276:9: note: candidate constructor template not viable: requires 3 arguments, but 1 was provided
            BasicError(ErrorCode code, const A& arg1, const B& arg2);
            ^
    /usr/local/include/exiv2/error.hpp:280:9: note: candidate constructor template not viable: requires 4 arguments, but 1 was provided
            BasicError(ErrorCode code, const A& arg1, const B& arg2, const C& arg3);
            ^
    src/exiv2wrapper.cpp:165:5: error: no matching conversion for functional-style cast from 'int' to 'Exiv2::Error' (aka 'BasicError<char>')
        CHECK_METADATA_READ
        ^~~~~~~~~~~~~~~~~~~
    src/exiv2wrapper.cpp:43:27: note: expanded from macro 'CHECK_METADATA_READ'
        if (!_dataRead) throw Exiv2::Error(METADATA_NOT_READ);
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/local/include/exiv2/error.hpp:263:11: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'int' to
          'const Exiv2::BasicError<char>' for 1st argument
        class BasicError : public AnyError {
              ^
    /usr/local/include/exiv2/error.hpp:268:18: note: candidate constructor not viable: no known conversion from 'int' to 'Exiv2::ErrorCode' for 1st argument
            explicit BasicError(ErrorCode code);
                     ^
    /usr/local/include/exiv2/error.hpp:272:9: note: candidate constructor template not viable: requires 2 arguments, but 1 was provided
            BasicError(ErrorCode code, const A& arg1);
            ^
    /usr/local/include/exiv2/error.hpp:276:9: note: candidate constructor template not viable: requires 3 arguments, but 1 was provided
            BasicError(ErrorCode code, const A& arg1, const B& arg2);
            ^
    /usr/local/include/exiv2/error.hpp:280:9: note: candidate constructor template not viable: requires 4 arguments, but 1 was provided
            BasicError(ErrorCode code, const A& arg1, const B& arg2, const C& arg3);
            ^
    src/exiv2wrapper.cpp:169:18: error: no matching constructor for initialization of 'Exiv2::Error' (aka 'BasicError<char>')
        Exiv2::Error error(0);
                     ^     ~
    /usr/local/include/exiv2/error.hpp:263:11: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'int' to
          'const Exiv2::BasicError<char>' for 1st argument
        class BasicError : public AnyError {
              ^
    /usr/local/include/exiv2/error.hpp:268:18: note: candidate constructor not viable: no known conversion from 'int' to 'Exiv2::ErrorCode' for 1st argument
            explicit BasicError(ErrorCode code);
                     ^
    /usr/local/include/exiv2/error.hpp:272:9: note: candidate constructor template not viable: requires 2 arguments, but 1 was provided
            BasicError(ErrorCode code, const A& arg1);
            ^
    /usr/local/include/exiv2/error.hpp:276:9: note: candidate constructor template not viable: requires 3 arguments, but 1 was provided
            BasicError(ErrorCode code, const A& arg1, const B& arg2);
            ^
    /usr/local/include/exiv2/error.hpp:280:9: note: candidate constructor template not viable: requires 4 arguments, but 1 was provided
            BasicError(ErrorCode code, const A& arg1, const B& arg2, const C& arg3);
            ^
    src/exiv2wrapper.cpp:195:5: error: no matching conversion for functional-style cast from 'int' to 'Exiv2::Error' (aka 'BasicError<char>')
        CHECK_METADATA_READ
        ^~~~~~~~~~~~~~~~~~~
    src/exiv2wrapper.cpp:43:27: note: expanded from macro 'CHECK_METADATA_READ'
        if (!_dataRead) throw Exiv2::Error(METADATA_NOT_READ);
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/local/include/exiv2/error.hpp:263:11: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'int' to
          'const Exiv2::BasicError<char>' for 1st argument
        class BasicError : public AnyError {
              ^
    /usr/local/include/exiv2/error.hpp:268:18: note: candidate constructor not viable: no known conversion from 'int' to 'Exiv2::ErrorCode' for 1st argument
            explicit BasicError(ErrorCode code);
                     ^
    /usr/local/include/exiv2/error.hpp:272:9: note: candidate constructor template not viable: requires 2 arguments, but 1 was provided
            BasicError(ErrorCode code, const A& arg1);
            ^
    /usr/local/include/exiv2/error.hpp:276:9: note: candidate constructor template not viable: requires 3 arguments, but 1 was provided
            BasicError(ErrorCode code, const A& arg1, const B& arg2);
            ^
    /usr/local/include/exiv2/error.hpp:280:9: note: candidate constructor template not viable: requires 4 arguments, but 1 was provided
            BasicError(ErrorCode code, const A& arg1, const B& arg2, const C& arg3);
            ^
    src/exiv2wrapper.cpp:201:5: error: no matching conversion for functional-style cast from 'int' to 'Exiv2::Error' (aka 'BasicError<char>')
        CHECK_METADATA_READ
        ^~~~~~~~~~~~~~~~~~~
    src/exiv2wrapper.cpp:43:27: note: expanded from macro 'CHECK_METADATA_READ'
        if (!_dataRead) throw Exiv2::Error(METADATA_NOT_READ);
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/local/include/exiv2/error.hpp:263:11: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'int' to
          'const Exiv2::BasicError<char>' for 1st argument
        class BasicError : public AnyError {
              ^
    /usr/local/include/exiv2/error.hpp:268:18: note: candidate constructor not viable: no known conversion from 'int' to 'Exiv2::ErrorCode' for 1st argument
            explicit BasicError(ErrorCode code);
                     ^
    /usr/local/include/exiv2/error.hpp:272:9: note: candidate constructor template not viable: requires 2 arguments, but 1 was provided
            BasicError(ErrorCode code, const A& arg1);
            ^
    /usr/local/include/exiv2/error.hpp:276:9: note: candidate constructor template not viable: requires 3 arguments, but 1 was provided
            BasicError(ErrorCode code, const A& arg1, const B& arg2);
            ^
    /usr/local/include/exiv2/error.hpp:280:9: note: candidate constructor template not viable: requires 4 arguments, but 1 was provided
            BasicError(ErrorCode code, const A& arg1, const B& arg2, const C& arg3);
            ^
    src/exiv2wrapper.cpp:207:5: error: no matching conversion for functional-style cast from 'int' to 'Exiv2::Error' (aka 'BasicError<char>')
        CHECK_METADATA_READ
        ^~~~~~~~~~~~~~~~~~~
    src/exiv2wrapper.cpp:43:27: note: expanded from macro 'CHECK_METADATA_READ'
        if (!_dataRead) throw Exiv2::Error(METADATA_NOT_READ);
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/local/include/exiv2/error.hpp:263:11: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'int' to
          'const Exiv2::BasicError<char>' for 1st argument
        class BasicError : public AnyError {
              ^
    /usr/local/include/exiv2/error.hpp:268:18: note: candidate constructor not viable: no known conversion from 'int' to 'Exiv2::ErrorCode' for 1st argument
            explicit BasicError(ErrorCode code);
                     ^
    /usr/local/include/exiv2/error.hpp:272:9: note: candidate constructor template not viable: requires 2 arguments, but 1 was provided
            BasicError(ErrorCode code, const A& arg1);
            ^
    /usr/local/include/exiv2/error.hpp:276:9: note: candidate constructor template not viable: requires 3 arguments, but 1 was provided
            BasicError(ErrorCode code, const A& arg1, const B& arg2);
            ^
    /usr/local/include/exiv2/error.hpp:280:9: note: candidate constructor template not viable: requires 4 arguments, but 1 was provided
            BasicError(ErrorCode code, const A& arg1, const B& arg2, const C& arg3);
            ^
    src/exiv2wrapper.cpp:213:5: error: no matching conversion for functional-style cast from 'int' to 'Exiv2::Error' (aka 'BasicError<char>')
        CHECK_METADATA_READ
        ^~~~~~~~~~~~~~~~~~~
    src/exiv2wrapper.cpp:43:27: note: expanded from macro 'CHECK_METADATA_READ'
        if (!_dataRead) throw Exiv2::Error(METADATA_NOT_READ);
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/local/include/exiv2/error.hpp:263:11: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'int' to
          'const Exiv2::BasicError<char>' for 1st argument
        class BasicError : public AnyError {
              ^
    /usr/local/include/exiv2/error.hpp:268:18: note: candidate constructor not viable: no known conversion from 'int' to 'Exiv2::ErrorCode' for 1st argument
            explicit BasicError(ErrorCode code);
                     ^
    /usr/local/include/exiv2/error.hpp:272:9: note: candidate constructor template not viable: requires 2 arguments, but 1 was provided
            BasicError(ErrorCode code, const A& arg1);
            ^
    /usr/local/include/exiv2/error.hpp:276:9: note: candidate constructor template not viable: requires 3 arguments, but 1 was provided
            BasicError(ErrorCode code, const A& arg1, const B& arg2);
            ^
    /usr/local/include/exiv2/error.hpp:280:9: note: candidate constructor template not viable: requires 4 arguments, but 1 was provided
            BasicError(ErrorCode code, const A& arg1, const B& arg2, const C& arg3);
            ^
    src/exiv2wrapper.cpp:227:5: error: no matching conversion for functional-style cast from 'int' to 'Exiv2::Error' (aka 'BasicError<char>')
        CHECK_METADATA_READ
        ^~~~~~~~~~~~~~~~~~~
    src/exiv2wrapper.cpp:43:27: note: expanded from macro 'CHECK_METADATA_READ'
        if (!_dataRead) throw Exiv2::Error(METADATA_NOT_READ);
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/local/include/exiv2/error.hpp:263:11: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'int' to
          'const Exiv2::BasicError<char>' for 1st argument
        class BasicError : public AnyError {
              ^
    /usr/local/include/exiv2/error.hpp:268:18: note: candidate constructor not viable: no known conversion from 'int' to 'Exiv2::ErrorCode' for 1st argument
            explicit BasicError(ErrorCode code);
                     ^
    /usr/local/include/exiv2/error.hpp:272:9: note: candidate constructor template not viable: requires 2 arguments, but 1 was provided
            BasicError(ErrorCode code, const A& arg1);
            ^
    /usr/local/include/exiv2/error.hpp:276:9: note: candidate constructor template not viable: requires 3 arguments, but 1 was provided
            BasicError(ErrorCode code, const A& arg1, const B& arg2);
            ^
    /usr/local/include/exiv2/error.hpp:280:9: note: candidate constructor template not viable: requires 4 arguments, but 1 was provided
            BasicError(ErrorCode code, const A& arg1, const B& arg2, const C& arg3);
            ^
    src/exiv2wrapper.cpp:233:15: error: no matching constructor for initialization of 'Exiv2::Error' (aka 'BasicError<char>')
            throw Exiv2::Error(KEY_NOT_FOUND, key);
                  ^            ~~~~~~~~~~~~~~~~~~
    /usr/local/include/exiv2/error.hpp:272:9: note: candidate constructor not viable: no known conversion from 'int' to 'Exiv2::ErrorCode' for 1st argument
            BasicError(ErrorCode code, const A& arg1);
            ^
    /usr/local/include/exiv2/error.hpp:276:9: note: candidate constructor template not viable: requires 3 arguments, but 2 were provided
            BasicError(ErrorCode code, const A& arg1, const B& arg2);
            ^
    /usr/local/include/exiv2/error.hpp:280:9: note: candidate constructor template not viable: requires 4 arguments, but 2 were provided
            BasicError(ErrorCode code, const A& arg1, const B& arg2, const C& arg3);
            ^
    /usr/local/include/exiv2/error.hpp:268:18: note: candidate constructor not viable: requires single argument 'code', but 2 arguments were provided
            explicit BasicError(ErrorCode code);
                     ^
    /usr/local/include/exiv2/error.hpp:263:11: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 2 were provided
        class BasicError : public AnyError {
              ^
    src/exiv2wrapper.cpp:241:5: error: no matching conversion for functional-style cast from 'int' to 'Exiv2::Error' (aka 'BasicError<char>')
        CHECK_METADATA_READ
        ^~~~~~~~~~~~~~~~~~~
    src/exiv2wrapper.cpp:43:27: note: expanded from macro 'CHECK_METADATA_READ'
        if (!_dataRead) throw Exiv2::Error(METADATA_NOT_READ);
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/local/include/exiv2/error.hpp:263:11: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'int' to
          'const Exiv2::BasicError<char>' for 1st argument
        class BasicError : public AnyError {
              ^
    /usr/local/include/exiv2/error.hpp:268:18: note: candidate constructor not viable: no known conversion from 'int' to 'Exiv2::ErrorCode' for 1st argument
            explicit BasicError(ErrorCode code);
                     ^
    /usr/local/include/exiv2/error.hpp:272:9: note: candidate constructor template not viable: requires 2 arguments, but 1 was provided
            BasicError(ErrorCode code, const A& arg1);
            ^
    /usr/local/include/exiv2/error.hpp:276:9: note: candidate constructor template not viable: requires 3 arguments, but 1 was provided
            BasicError(ErrorCode code, const A& arg1, const B& arg2);
            ^
    /usr/local/include/exiv2/error.hpp:280:9: note: candidate constructor template not viable: requires 4 arguments, but 1 was provided
            BasicError(ErrorCode code, const A& arg1, const B& arg2, const C& arg3);
            ^
    src/exiv2wrapper.cpp:247:15: error: no matching constructor for initialization of 'Exiv2::Error' (aka 'BasicError<char>')
            throw Exiv2::Error(KEY_NOT_FOUND, key);
                  ^            ~~~~~~~~~~~~~~~~~~
    /usr/local/include/exiv2/error.hpp:272:9: note: candidate constructor not viable: no known conversion from 'int' to 'Exiv2::ErrorCode' for 1st argument
            BasicError(ErrorCode code, const A& arg1);
            ^
    /usr/local/include/exiv2/error.hpp:276:9: note: candidate constructor template not viable: requires 3 arguments, but 2 were provided
            BasicError(ErrorCode code, const A& arg1, const B& arg2);
            ^
    /usr/local/include/exiv2/error.hpp:280:9: note: candidate constructor template not viable: requires 4 arguments, but 2 were provided
            BasicError(ErrorCode code, const A& arg1, const B& arg2, const C& arg3);
            ^
    /usr/local/include/exiv2/error.hpp:268:18: note: candidate constructor not viable: requires single argument 'code', but 2 arguments were provided
            explicit BasicError(ErrorCode code);
                     ^
    /usr/local/include/exiv2/error.hpp:263:11: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 2 were provided
        class BasicError : public AnyError {
              ^
    src/exiv2wrapper.cpp:255:5: error: no matching conversion for functional-style cast from 'int' to 'Exiv2::Error' (aka 'BasicError<char>')
        CHECK_METADATA_READ
        ^~~~~~~~~~~~~~~~~~~
    src/exiv2wrapper.cpp:43:27: note: expanded from macro 'CHECK_METADATA_READ'
        if (!_dataRead) throw Exiv2::Error(METADATA_NOT_READ);
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/local/include/exiv2/error.hpp:263:11: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'int' to
          'const Exiv2::BasicError<char>' for 1st argument
        class BasicError : public AnyError {
              ^
    /usr/local/include/exiv2/error.hpp:268:18: note: candidate constructor not viable: no known conversion from 'int' to 'Exiv2::ErrorCode' for 1st argument
            explicit BasicError(ErrorCode code);
                     ^
    /usr/local/include/exiv2/error.hpp:272:9: note: candidate constructor template not viable: requires 2 arguments, but 1 was provided
            BasicError(ErrorCode code, const A& arg1);
            ^
    /usr/local/include/exiv2/error.hpp:276:9: note: candidate constructor template not viable: requires 3 arguments, but 1 was provided
            BasicError(ErrorCode code, const A& arg1, const B& arg2);
            ^
    /usr/local/include/exiv2/error.hpp:280:9: note: candidate constructor template not viable: requires 4 arguments, but 1 was provided
            BasicError(ErrorCode code, const A& arg1, const B& arg2, const C& arg3);
            ^
    src/exiv2wrapper.cpp:274:5: error: no matching conversion for functional-style cast from 'int' to 'Exiv2::Error' (aka 'BasicError<char>')
        CHECK_METADATA_READ
        ^~~~~~~~~~~~~~~~~~~
    src/exiv2wrapper.cpp:43:27: note: expanded from macro 'CHECK_METADATA_READ'
        if (!_dataRead) throw Exiv2::Error(METADATA_NOT_READ);
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/local/include/exiv2/error.hpp:263:11: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'int' to
          'const Exiv2::BasicError<char>' for 1st argument
        class BasicError : public AnyError {
              ^
    /usr/local/include/exiv2/error.hpp:268:18: note: candidate constructor not viable: no known conversion from 'int' to 'Exiv2::ErrorCode' for 1st argument
            explicit BasicError(ErrorCode code);
                     ^
    /usr/local/include/exiv2/error.hpp:272:9: note: candidate constructor template not viable: requires 2 arguments, but 1 was provided
            BasicError(ErrorCode code, const A& arg1);
            ^
    /usr/local/include/exiv2/error.hpp:276:9: note: candidate constructor template not viable: requires 3 arguments, but 1 was provided
            BasicError(ErrorCode code, const A& arg1, const B& arg2);
            ^
    /usr/local/include/exiv2/error.hpp:280:9: note: candidate constructor template not viable: requires 4 arguments, but 1 was provided
            BasicError(ErrorCode code, const A& arg1, const B& arg2, const C& arg3);
            ^
    src/exiv2wrapper.cpp:280:15: error: no matching constructor for initialization of 'Exiv2::Error' (aka 'BasicError<char>')
            throw Exiv2::Error(KEY_NOT_FOUND, key);
                  ^            ~~~~~~~~~~~~~~~~~~
    /usr/local/include/exiv2/error.hpp:272:9: note: candidate constructor not viable: no known conversion from 'int' to 'Exiv2::ErrorCode' for 1st argument
            BasicError(ErrorCode code, const A& arg1);
            ^
    /usr/local/include/exiv2/error.hpp:276:9: note: candidate constructor template not viable: requires 3 arguments, but 2 were provided
            BasicError(ErrorCode code, const A& arg1, const B& arg2);
            ^
    /usr/local/include/exiv2/error.hpp:280:9: note: candidate constructor template not viable: requires 4 arguments, but 2 were provided
            BasicError(ErrorCode code, const A& arg1, const B& arg2, const C& arg3);
            ^
    /usr/local/include/exiv2/error.hpp:268:18: note: candidate constructor not viable: requires single argument 'code', but 2 arguments were provided
            explicit BasicError(ErrorCode code);
                     ^
    /usr/local/include/exiv2/error.hpp:263:11: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 2 were provided
        class BasicError : public AnyError {
              ^
    src/exiv2wrapper.cpp:288:5: error: no matching conversion for functional-style cast from 'int' to 'Exiv2::Error' (aka 'BasicError<char>')
        CHECK_METADATA_READ
        ^~~~~~~~~~~~~~~~~~~
    src/exiv2wrapper.cpp:43:27: note: expanded from macro 'CHECK_METADATA_READ'
        if (!_dataRead) throw Exiv2::Error(METADATA_NOT_READ);
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/local/include/exiv2/error.hpp:263:11: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'int' to
          'const Exiv2::BasicError<char>' for 1st argument
        class BasicError : public AnyError {
              ^
    /usr/local/include/exiv2/error.hpp:268:18: note: candidate constructor not viable: no known conversion from 'int' to 'Exiv2::ErrorCode' for 1st argument
            explicit BasicError(ErrorCode code);
                     ^
    /usr/local/include/exiv2/error.hpp:272:9: note: candidate constructor template not viable: requires 2 arguments, but 1 was provided
            BasicError(ErrorCode code, const A& arg1);
            ^
    /usr/local/include/exiv2/error.hpp:276:9: note: candidate constructor template not viable: requires 3 arguments, but 1 was provided
            BasicError(ErrorCode code, const A& arg1, const B& arg2);
            ^
    /usr/local/include/exiv2/error.hpp:280:9: note: candidate constructor template not viable: requires 4 arguments, but 1 was provided
            BasicError(ErrorCode code, const A& arg1, const B& arg2, const C& arg3);
            ^
    src/exiv2wrapper.cpp:295:15: error: no matching constructor for initialization of 'Exiv2::Error' (aka 'BasicError<char>')
            throw Exiv2::Error(KEY_NOT_FOUND, key);
                  ^            ~~~~~~~~~~~~~~~~~~
    /usr/local/include/exiv2/error.hpp:272:9: note: candidate constructor not viable: no known conversion from 'int' to 'Exiv2::ErrorCode' for 1st argument
            BasicError(ErrorCode code, const A& arg1);
            ^
    /usr/local/include/exiv2/error.hpp:276:9: note: candidate constructor template not viable: requires 3 arguments, but 2 were provided
            BasicError(ErrorCode code, const A& arg1, const B& arg2);
            ^
    /usr/local/include/exiv2/error.hpp:280:9: note: candidate constructor template not viable: requires 4 arguments, but 2 were provided
            BasicError(ErrorCode code, const A& arg1, const B& arg2, const C& arg3);
            ^
    /usr/local/include/exiv2/error.hpp:268:18: note: candidate constructor not viable: requires single argument 'code', but 2 arguments were provided
            explicit BasicError(ErrorCode code);
                     ^
    /usr/local/include/exiv2/error.hpp:263:11: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 2 were provided
        class BasicError : public AnyError {
              ^
    src/exiv2wrapper.cpp:313:5: error: no matching conversion for functional-style cast from 'int' to 'Exiv2::Error' (aka 'BasicError<char>')
        CHECK_METADATA_READ
        ^~~~~~~~~~~~~~~~~~~
    src/exiv2wrapper.cpp:43:27: note: expanded from macro 'CHECK_METADATA_READ'
        if (!_dataRead) throw Exiv2::Error(METADATA_NOT_READ);
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/local/include/exiv2/error.hpp:263:11: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'int' to
          'const Exiv2::BasicError<char>' for 1st argument
        class BasicError : public AnyError {
              ^
    /usr/local/include/exiv2/error.hpp:268:18: note: candidate constructor not viable: no known conversion from 'int' to 'Exiv2::ErrorCode' for 1st argument
            explicit BasicError(ErrorCode code);
                     ^
    /usr/local/include/exiv2/error.hpp:272:9: note: candidate constructor template not viable: requires 2 arguments, but 1 was provided
            BasicError(ErrorCode code, const A& arg1);
            ^
    /usr/local/include/exiv2/error.hpp:276:9: note: candidate constructor template not viable: requires 3 arguments, but 1 was provided
            BasicError(ErrorCode code, const A& arg1, const B& arg2);
            ^
    /usr/local/include/exiv2/error.hpp:280:9: note: candidate constructor template not viable: requires 4 arguments, but 1 was provided
            BasicError(ErrorCode code, const A& arg1, const B& arg2, const C& arg3);
            ^
    src/exiv2wrapper.cpp:327:5: error: no matching conversion for functional-style cast from 'int' to 'Exiv2::Error' (aka 'BasicError<char>')
        CHECK_METADATA_READ
        ^~~~~~~~~~~~~~~~~~~
    src/exiv2wrapper.cpp:43:27: note: expanded from macro 'CHECK_METADATA_READ'
        if (!_dataRead) throw Exiv2::Error(METADATA_NOT_READ);
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/local/include/exiv2/error.hpp:263:11: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'int' to
          'const Exiv2::BasicError<char>' for 1st argument
        class BasicError : public AnyError {
              ^
    /usr/local/include/exiv2/error.hpp:268:18: note: candidate constructor not viable: no known conversion from 'int' to 'Exiv2::ErrorCode' for 1st argument
            explicit BasicError(ErrorCode code);
                     ^
    /usr/local/include/exiv2/error.hpp:272:9: note: candidate constructor template not viable: requires 2 arguments, but 1 was provided
            BasicError(ErrorCode code, const A& arg1);
            ^
    /usr/local/include/exiv2/error.hpp:276:9: note: candidate constructor template not viable: requires 3 arguments, but 1 was provided
            BasicError(ErrorCode code, const A& arg1, const B& arg2);
            ^
    /usr/local/include/exiv2/error.hpp:280:9: note: candidate constructor template not viable: requires 4 arguments, but 1 was provided
            BasicError(ErrorCode code, const A& arg1, const B& arg2, const C& arg3);
            ^
    fatal error: too many errors emitted, stopping now [-ferror-limit=]
    20 errors generated.

  10. #10
    Membre à l'essai
    Homme Profil pro
    Consultant informatique
    Inscrit en
    Juin 2013
    Messages
    20
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Consultant informatique
    Secteur : Administration - Collectivité locale

    Informations forums :
    Inscription : Juin 2013
    Messages : 20
    Points : 11
    Points
    11
    Par défaut Pour la librairie lboost_python
    Il me semble qu'il manquait un bout de code à la fin du script.
    Mais comme elle ne peut se trouver que sous /usr/local/lib, la recherche est simplifiée.
    Par contre, les librairies sous mac os x , depuis la 10.1, ne sont plus en .so mais en dynamique .dylib
    Ce qui ne devrait pas changer grand chose au problème.

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    $ ls /usr/local/lib/*boost* | grep python
    /usr/local/lib/libboost_python37-mt.a
    /usr/local/lib/libboost_python37-mt.dylib
    /usr/local/lib/libboost_python37.a
    /usr/local/lib/libboost_python37.dylib
    $
    Quand je serai au stade de la troisième commande, il me semble qu'il suffira de préciser en rajoutant un "7":
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    g++ -o build/libexiv2python.so -shared build/exiv2wrapper.os build/exiv2wrapper_python.os -lboost_python37 -lexiv2
    Merci de ton aide.

  11. #11
    Expert éminent

    Homme Profil pro
    Inscrit en
    Octobre 2008
    Messages
    4 298
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Belgique

    Informations forums :
    Inscription : Octobre 2008
    Messages : 4 298
    Points : 6 778
    Points
    6 778
    Par défaut
    mouais, exiv2 me semble en cause ici.

    D'ailleurs ceci date du mois de novembre:
    https://gitlab.gnome.org/GNOME/gnome...ests/1/commits

    Et ceci il y a une heure (c'est peut-être toi):
    https://stackoverflow.com/questions/...-on-the-mac-os

    Le gars qui répond dit qu'il n'a pas eu de problème.

  12. #12
    Membre à l'essai
    Homme Profil pro
    Consultant informatique
    Inscrit en
    Juin 2013
    Messages
    20
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Consultant informatique
    Secteur : Administration - Collectivité locale

    Informations forums :
    Inscription : Juin 2013
    Messages : 20
    Points : 11
    Points
    11
    Par défaut
    Oui, cela semble bien être le cas. Un problème avec exiv2.
    Je n'avais pas vu le premier post.
    Hélas, la réponse au deuxième est "debian".
    Ce qui explique sans doute, qu'il n'a pas eu de problème.
    Brew me jette quand je tente les install en remplaçant apt-get par brew.

    Et la deuxième solution a déjà été testée.
    Grrr !
    Je vais continuer à chercher ce soir, mais je me sens maintenant un peu "démuni" ...
    @+

  13. #13
    Expert éminent

    Homme Profil pro
    Inscrit en
    Octobre 2008
    Messages
    4 298
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Belgique

    Informations forums :
    Inscription : Octobre 2008
    Messages : 4 298
    Points : 6 778
    Points
    6 778
    Par défaut
    En fait tu as 3 semaines de malchance contre toi.

    La version 0.27 de exiv2 modifie totalement la définition des erreurs et cette version est sortie le 20 décembre.

    Je vais modifier mon code en conséquence mais ma version d'exiv2 est la 0.25 donc pour tester mes modifications je dois voir si un environnement virtuel peux aider.
    Donc ce ne sera pas pour tout de suite.

    Maintenant si tu peux installer une version inférieur de exiv2, c'est une solution plus rapide

  14. #14
    Membre à l'essai
    Homme Profil pro
    Consultant informatique
    Inscrit en
    Juin 2013
    Messages
    20
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Consultant informatique
    Secteur : Administration - Collectivité locale

    Informations forums :
    Inscription : Juin 2013
    Messages : 20
    Points : 11
    Points
    11
    Par défaut
    OK, je vais tenter le coup ce soir.
    @+

  15. #15
    Membre à l'essai
    Homme Profil pro
    Consultant informatique
    Inscrit en
    Juin 2013
    Messages
    20
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Consultant informatique
    Secteur : Administration - Collectivité locale

    Informations forums :
    Inscription : Juin 2013
    Messages : 20
    Points : 11
    Points
    11
    Par défaut
    Comme l'installation de version ancienne n'est plus géré par les dernières versions de brew, il a fallu reprendre le chausse-pied.
    Comme le disait Sempé, "Rien n'est simple, tout ce complique" :-))
    Après quelques aléas, j'ai néanmoins réussi à installer exiv version 0.25
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    $ brew info exiv2
    exiv2: stable 0.25 (bottled), HEAD
    EXIF and IPTC metadata manipulation library and tools
    http://www.exiv2.org
    /usr/local/Cellar/exiv2/0.25 (50 files, 7.5MB) *
      Poured from bottle on 2019-01-17 at 18:54:51
    From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/exiv2.rb
    ==> Options
    --universal
    	Build a universal binary
    --HEAD
    	Install HEAD version
    ==> Analytics
    install: 1,652 (30 days), 3,129 (90 days), 6,619 (365 days)
    install_on_request: 687 (30 days), 1,215 (90 days), 3,288 (365 days)
    build_error: 0 (30 days)
    $ pip3 install py3exiv2-0.4.0.tar.gz
    Processing ./py3exiv2-0.4.0.tar.gz
    Building wheels for collected packages: py3exiv2
      Running setup.py bdist_wheel for py3exiv2 ... done
      Stored in directory: /Users/jrc/Library/Caches/pip/wheels/18/7b/47/e71e02e453d133f161a94a9a0b84e9390048145be21799e1ac
    Successfully built py3exiv2
    Installing collected packages: py3exiv2
    Successfully installed py3exiv2-0.1.0
     
    $ pip3 install py3exiv2
    Requirement already satisfied: py3exiv2 in /usr/local/lib/python3.7/site-packages (0.1.0)
    A ce stade tout semble OK, sauf que :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    $ python3
    Python 3.7.2 (default, Jan 13 2019, 12:50:01) 
    [Clang 10.0.0 (clang-1000.11.45.5)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import py3exiv2
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    ModuleNotFoundError: No module named 'py3exiv2'
    >>>
    Grrrr !
    Je me dis que l'install faite ci-dessus à partir du .tar.gz reconstitué n'est pas forcément le moyen le meilleur.
    Donc, je désinstalle et cherche à réinstaller suivant la formule standard en prenant les fichiers en ligne :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
     
    $ pip3 uninstall py3exiv2
    Uninstalling py3exiv2-0.1.0:
      Would remove:
        /usr/local/lib/python3.7/site-packages/libexiv2python.cpython-37m-darwin.so
        /usr/local/lib/python3.7/site-packages/py3exiv2-0.1.0.dist-info/*
        /usr/local/lib/python3.7/site-packages/pyexiv2/*
    Proceed (y/n)? y
      Successfully uninstalled py3exiv2-0.1.0
    mbjrc:pyexiv.d jrc$ pip3 install py3exiv2
    Collecting py3exiv2
      Using cached https://files.pythonhosted.org/packages/95/e3/d43f8635d85074f1e128ca42b7abda7655eb10d592081625f6125b72d356/py3exiv2-0.4.0.tar.gz
    Building wheels for collected packages: py3exiv2
      Running setup.py bdist_wheel for py3exiv2 ... error
      Complete output from command /usr/local/opt/python/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/by/qz__qn5j6nj2prdhwbh3vdvm0000gp/T/pip-install-pgpmsjuo/py3exiv2/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /private/var/folders/by/qz__qn5j6nj2prdhwbh3vdvm0000gp/T/pip-wheel-jxmdiwim --python-tag cp37:
      find: /usr//sbin/authserver: Permission denied
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-10.14-x86_64-3.7
      creating build/lib.macosx-10.14-x86_64-3.7/pyexiv2
      copying src/pyexiv2/preview.py -> build/lib.macosx-10.14-x86_64-3.7/pyexiv2
      copying src/pyexiv2/iptc.py -> build/lib.macosx-10.14-x86_64-3.7/pyexiv2
      copying src/pyexiv2/metadata.py -> build/lib.macosx-10.14-x86_64-3.7/pyexiv2
      copying src/pyexiv2/__init__.py -> build/lib.macosx-10.14-x86_64-3.7/pyexiv2
      copying src/pyexiv2/xmp.py -> build/lib.macosx-10.14-x86_64-3.7/pyexiv2
      copying src/pyexiv2/exif.py -> build/lib.macosx-10.14-x86_64-3.7/pyexiv2
      copying src/pyexiv2/utils.py -> build/lib.macosx-10.14-x86_64-3.7/pyexiv2
      running build_ext
      building 'libexiv2python' extension
      creating build/temp.macosx-10.14-x86_64-3.7
      creating build/temp.macosx-10.14-x86_64-3.7/src
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c src/exiv2wrapper.cpp -o build/temp.macosx-10.14-x86_64-3.7/src/exiv2wrapper.o -g
      src/exiv2wrapper.cpp:1356:28: warning: unused variable 'ns' [-Wunused-variable]
              const std::string& ns = Exiv2::XmpProperties::ns(prefix);
                                 ^
      src/exiv2wrapper.cpp:1376:37: warning: unused variable 'info' [-Wunused-variable]
                  const Exiv2::XmpNsInfo* info = Exiv2::XmpProperties::nsInfo(prefix);
                                          ^
      2 warnings generated.
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c src/exiv2wrapper_python.cpp -o build/temp.macosx-10.14-x86_64-3.7/src/exiv2wrapper_python.o -g
      Traceback (most recent call last):
        File "<string>", line 1, in <module>
        File "/private/var/folders/by/qz__qn5j6nj2prdhwbh3vdvm0000gp/T/pip-install-pgpmsjuo/py3exiv2/setup.py", line 78, in <module>
          extra_compile_args=['-g']
        File "/usr/local/lib/python3.7/site-packages/setuptools/__init__.py", line 143, in setup
          return distutils.core.setup(**attrs)
        File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/core.py", line 148, in setup
          dist.run_commands()
        File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 966, in run_commands
          self.run_command(cmd)
        File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command
          cmd_obj.run()
        File "/usr/local/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 188, in run
          self.run_command('build')
        File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/cmd.py", line 313, in run_command
          self.distribution.run_command(command)
        File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command
          cmd_obj.run()
        File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/command/build.py", line 135, in run
          self.run_command(cmd_name)
        File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/cmd.py", line 313, in run_command
          self.distribution.run_command(command)
        File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command
          cmd_obj.run()
        File "/usr/local/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 78, in run
          _build_ext.run(self)
        File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/command/build_ext.py", line 339, in run
          self.build_extensions()
        File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/command/build_ext.py", line 448, in build_extensions
          self._build_extensions_serial()
        File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/command/build_ext.py", line 473, in _build_extensions_serial
          self.build_extension(ext)
        File "/usr/local/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 199, in build_extension
          _build_ext.build_extension(self, ext)
        File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/command/build_ext.py", line 558, in build_extension
          target_lang=language)
        File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/ccompiler.py", line 717, in link_shared_object
          extra_preargs, extra_postargs, build_temp, target_lang)
        File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/unixccompiler.py", line 159, in link
          libraries)
        File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/ccompiler.py", line 1105, in gen_lib_options
          (lib_dir, lib_name) = os.path.split(lib)
        File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/posixpath.py", line 107, in split
          p = os.fspath(p)
      TypeError: expected str, bytes or os.PathLike object, not NoneType
     
      ----------------------------------------
      Failed building wheel for py3exiv2
      Running setup.py clean for py3exiv2
    Failed to build py3exiv2
    Installing collected packages: py3exiv2
      Running setup.py install for py3exiv2 ... error
        Complete output from command /usr/local/opt/python/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/by/qz__qn5j6nj2prdhwbh3vdvm0000gp/T/pip-install-pgpmsjuo/py3exiv2/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/by/qz__qn5j6nj2prdhwbh3vdvm0000gp/T/pip-record-2pc2j9vu/install-record.txt --single-version-externally-managed --compile:
        find: /usr//sbin/authserver: Permission denied
        running install
        running build
        running build_py
        creating build
        creating build/lib.macosx-10.14-x86_64-3.7
        creating build/lib.macosx-10.14-x86_64-3.7/pyexiv2
        copying src/pyexiv2/preview.py -> build/lib.macosx-10.14-x86_64-3.7/pyexiv2
        copying src/pyexiv2/iptc.py -> build/lib.macosx-10.14-x86_64-3.7/pyexiv2
        copying src/pyexiv2/metadata.py -> build/lib.macosx-10.14-x86_64-3.7/pyexiv2
        copying src/pyexiv2/__init__.py -> build/lib.macosx-10.14-x86_64-3.7/pyexiv2
        copying src/pyexiv2/xmp.py -> build/lib.macosx-10.14-x86_64-3.7/pyexiv2
        copying src/pyexiv2/exif.py -> build/lib.macosx-10.14-x86_64-3.7/pyexiv2
        copying src/pyexiv2/utils.py -> build/lib.macosx-10.14-x86_64-3.7/pyexiv2
        running build_ext
        building 'libexiv2python' extension
        creating build/temp.macosx-10.14-x86_64-3.7
        creating build/temp.macosx-10.14-x86_64-3.7/src
        clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c src/exiv2wrapper.cpp -o build/temp.macosx-10.14-x86_64-3.7/src/exiv2wrapper.o -g
        src/exiv2wrapper.cpp:1356:28: warning: unused variable 'ns' [-Wunused-variable]
                const std::string& ns = Exiv2::XmpProperties::ns(prefix);
                                   ^
        src/exiv2wrapper.cpp:1376:37: warning: unused variable 'info' [-Wunused-variable]
                    const Exiv2::XmpNsInfo* info = Exiv2::XmpProperties::nsInfo(prefix);
                                            ^
        2 warnings generated.
        clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c src/exiv2wrapper_python.cpp -o build/temp.macosx-10.14-x86_64-3.7/src/exiv2wrapper_python.o -g
        Traceback (most recent call last):
          File "<string>", line 1, in <module>
          File "/private/var/folders/by/qz__qn5j6nj2prdhwbh3vdvm0000gp/T/pip-install-pgpmsjuo/py3exiv2/setup.py", line 78, in <module>
            extra_compile_args=['-g']
          File "/usr/local/lib/python3.7/site-packages/setuptools/__init__.py", line 143, in setup
            return distutils.core.setup(**attrs)
          File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/core.py", line 148, in setup
            dist.run_commands()
          File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 966, in run_commands
            self.run_command(cmd)
          File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command
            cmd_obj.run()
          File "/usr/local/lib/python3.7/site-packages/setuptools/command/install.py", line 61, in run
            return orig.install.run(self)
          File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/command/install.py", line 545, in run
            self.run_command('build')
          File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/cmd.py", line 313, in run_command
            self.distribution.run_command(command)
          File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command
            cmd_obj.run()
          File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/command/build.py", line 135, in run
            self.run_command(cmd_name)
          File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/cmd.py", line 313, in run_command
            self.distribution.run_command(command)
          File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command
            cmd_obj.run()
          File "/usr/local/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 78, in run
            _build_ext.run(self)
          File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/command/build_ext.py", line 339, in run
            self.build_extensions()
          File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/command/build_ext.py", line 448, in build_extensions
            self._build_extensions_serial()
          File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/command/build_ext.py", line 473, in _build_extensions_serial
            self.build_extension(ext)
          File "/usr/local/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 199, in build_extension
            _build_ext.build_extension(self, ext)
          File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/command/build_ext.py", line 558, in build_extension
            target_lang=language)
          File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/ccompiler.py", line 717, in link_shared_object
            extra_preargs, extra_postargs, build_temp, target_lang)
          File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/unixccompiler.py", line 159, in link
            libraries)
          File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/ccompiler.py", line 1105, in gen_lib_options
            (lib_dir, lib_name) = os.path.split(lib)
          File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/posixpath.py", line 107, in split
            p = os.fspath(p)
        TypeError: expected str, bytes or os.PathLike object, not NoneType
     
        ----------------------------------------
    Command "/usr/local/opt/python/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/by/qz__qn5j6nj2prdhwbh3vdvm0000gp/T/pip-install-pgpmsjuo/py3exiv2/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/by/qz__qn5j6nj2prdhwbh3vdvm0000gp/T/pip-record-2pc2j9vu/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/by/qz__qn5j6nj2prdhwbh3vdvm0000gp/T/pip-install-pgpmsjuo/py3exiv2/
    Maintenant, je vais essayer de reprendre vos 3 lignes de compilation et vous tiens informé.

  16. #16
    Membre à l'essai
    Homme Profil pro
    Consultant informatique
    Inscrit en
    Juin 2013
    Messages
    20
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Consultant informatique
    Secteur : Administration - Collectivité locale

    Informations forums :
    Inscription : Juin 2013
    Messages : 20
    Points : 11
    Points
    11
    Par défaut Avec les 3 commandes g++
    Les 2 premières passent sans problème, mais le link crashe

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    $ g++ -o build/exiv2wrapper.os -c -fPIC -I/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m src/exiv2wrapper.cpp
    $ g++ -o build/exiv2wrapper_python.os -c -fPIC -I/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m src/exiv2wrapper_python.cpp
    $ g++ -o build/libexiv2python.so -shared build/exiv2wrapper.os build/exiv2wrapper_python.os -lboost_python37 -lexiv2
    Undefined symbols for architecture x86_64:
      "_PyBool_FromLong", referenced from:
          boost::python::to_python_value<bool const&>::operator()(bool const&) const in exiv2wrapper_python.os
      "_PyBool_Type", referenced from:
          boost::python::to_python_value<bool const&>::get_pytype() const in exiv2wrapper_python.os
      "_PyBytes_FromStringAndSize", referenced from:
          exiv2wrapper::Image::getDataBuffer() const in exiv2wrapper.os
      "_PyDict_Type", referenced from:
          boost::python::converter::pyobject_type<boost::python::dict, &(PyDict_Type)>::check(_object*) in exiv2wrapper_python.os
          boost::python::converter::pyobject_type<boost::python::dict, &(PyDict_Type)>::get_pytype() in exiv2wrapper_python.os
      "_PyErr_Occurred", referenced from:
          boost::python::len(boost::python::api::object const&) in exiv2wrapper.os
      "_PyErr_SetString", referenced from:
          exiv2wrapper::translateExiv2Error(Exiv2::BasicError<char> const&) in exiv2wrapper.os
      "_PyEval_RestoreThread", referenced from:
          exiv2wrapper::Image::_instantiate_image() in exiv2wrapper.os
          exiv2wrapper::Image::readMetadata() in exiv2wrapper.os
          exiv2wrapper::Image::writeMetadata() in exiv2wrapper.os
          exiv2wrapper::Image::getDataBuffer() const in exiv2wrapper.os
      "_PyEval_SaveThread", referenced from:
          exiv2wrapper::Image::_instantiate_image() in exiv2wrapper.os
          exiv2wrapper::Image::readMetadata() in exiv2wrapper.os
          exiv2wrapper::Image::writeMetadata() in exiv2wrapper.os
          exiv2wrapper::Image::getDataBuffer() const in exiv2wrapper.os
      "_PyExc_IOError", referenced from:
          exiv2wrapper::translateExiv2Error(Exiv2::BasicError<char> const&) in exiv2wrapper.os
      "_PyExc_KeyError", referenced from:
          exiv2wrapper::translateExiv2Error(Exiv2::BasicError<char> const&) in exiv2wrapper.os
      "_PyExc_RuntimeError", referenced from:
          exiv2wrapper::translateExiv2Error(Exiv2::BasicError<char> const&) in exiv2wrapper.os
      "_PyExc_TypeError", referenced from:
          exiv2wrapper::translateExiv2Error(Exiv2::BasicError<char> const&) in exiv2wrapper.os
      "_PyExc_ValueError", referenced from:
          exiv2wrapper::translateExiv2Error(Exiv2::BasicError<char> const&) in exiv2wrapper.os
      "_PyList_Type", referenced from:
          boost::python::converter::pyobject_type<boost::python::list, &(PyList_Type)>::check(_object*) in exiv2wrapper_python.os
          boost::python::converter::pyobject_type<boost::python::list, &(PyList_Type)>::get_pytype() in exiv2wrapper_python.os
      "_PyLong_FromLong", referenced from:
          boost::python::converter::arg_to_python<int>::arg_to_python(int const&) in exiv2wrapper_python.os
          boost::python::to_python_value<int const&>::operator()(int const&) const in exiv2wrapper_python.os
      "_PyLong_FromUnsignedLong", referenced from:
          boost::python::converter::arg_to_python<unsigned int>::arg_to_python(unsigned int const&) in exiv2wrapper.os
          boost::python::to_python_value<unsigned int&>::operator()(unsigned int const&) const in exiv2wrapper_python.os
          boost::python::to_python_value<unsigned int const&>::operator()(unsigned int const&) const in exiv2wrapper_python.os
      "_PyLong_Type", referenced from:
          boost::python::to_python_value<int const&>::get_pytype() const in exiv2wrapper_python.os
          boost::python::to_python_value<unsigned int&>::get_pytype() const in exiv2wrapper_python.os
          boost::python::to_python_value<unsigned int const&>::get_pytype() const in exiv2wrapper_python.os
      "_PyObject_IsInstance", referenced from:
          boost::python::converter::pyobject_type<boost::python::list, &(PyList_Type)>::check(_object*) in exiv2wrapper_python.os
          boost::python::converter::pyobject_type<boost::python::dict, &(PyDict_Type)>::check(_object*) in exiv2wrapper_python.os
      "_PyObject_Size", referenced from:
          boost::python::len(boost::python::api::object const&) in exiv2wrapper.os
      "_PyTuple_New", referenced from:
          boost::python::tuple boost::python::make_tuple<unsigned int, unsigned int>(unsigned int const&, unsigned int const&) in exiv2wrapper.os
          boost::python::tuple boost::python::make_tuple<int, int, int>(int const&, int const&, int const&) in exiv2wrapper_python.os
      "_PyTuple_Type", referenced from:
          boost::python::converter::pyobject_type<boost::python::tuple, &(PyTuple_Type)>::get_pytype() in exiv2wrapper_python.os
      "_PyUnicode_FromStringAndSize", referenced from:
          boost::python::converter::arg_to_python<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::arg_to_python(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in exiv2wrapper.os
          boost::python::to_python_value<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&>::operator()(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const in exiv2wrapper_python.os
          boost::python::to_python_value<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&>::operator()(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const in exiv2wrapper_python.os
      "_PyUnicode_Type", referenced from:
          boost::python::to_python_value<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&>::get_pytype() const in exiv2wrapper_python.os
          boost::python::to_python_value<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&>::get_pytype() const in exiv2wrapper_python.os
      "__Py_NoneStruct", referenced from:
          boost::python::api::object::object() in exiv2wrapper.os
          boost::python::api::object::object() in exiv2wrapper_python.os
          boost::python::scope::scope() in exiv2wrapper_python.os
          boost::python::converter::shared_ptr_from_python<exiv2wrapper::ExifTag, boost::shared_ptr>::convertible(_object*) in exiv2wrapper_python.os
          boost::python::detail::none() in exiv2wrapper_python.os
          boost::python::converter::shared_ptr_from_python<exiv2wrapper::IptcTag, boost::shared_ptr>::convertible(_object*) in exiv2wrapper_python.os
          boost::python::converter::shared_ptr_from_python<exiv2wrapper::XmpTag, boost::shared_ptr>::convertible(_object*) in exiv2wrapper_python.os
          ...
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    Je pense que je vais devoir attendre la mise en place de ton environnement virtuel ...
    Je te souhaite bonne chance pour la mise en place de l'environnement virtuel mac...
    Hélas, je ne suis pas chez moi et ne peux même pas proposer une aide... (ici, j'ai une connexion internet pourrie)

  17. #17
    Expert éminent

    Homme Profil pro
    Inscrit en
    Octobre 2008
    Messages
    4 298
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Belgique

    Informations forums :
    Inscription : Octobre 2008
    Messages : 4 298
    Points : 6 778
    Points
    6 778
    Par défaut
    Pour des raisons de compatibilité avec les codes écrits pour la version Python 2 je n'ai pas changé le nom des modules.

    De sorte qu'un code qui tournait sous Python2 puisse directement servir sous Python3.
    Regarde ici: https://python3-exiv2.readthedocs.io.../tutorial.html

    Edit: il faut utiliser le fichier setup.py patché spécialement pour Mc OSX comme indiqué dans le lien plus haut sinon la recherche de libboost-python retourne None.
    https://incoherentmusings.wordpress....iv2-on-macosx/

  18. #18
    Membre à l'essai
    Homme Profil pro
    Consultant informatique
    Inscrit en
    Juin 2013
    Messages
    20
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Consultant informatique
    Secteur : Administration - Collectivité locale

    Informations forums :
    Inscription : Juin 2013
    Messages : 20
    Points : 11
    Points
    11
    Par défaut Hourra ! Hourra !
    Bravo VinS !

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    $ pip3 install py3exiv2-0.4.0.tar.gz 
    Processing ./py3exiv2-0.4.0.tar.gz
    Building wheels for collected packages: py3exiv2
      Running setup.py bdist_wheel for py3exiv2 ... done
      Stored in directory: /Users/jrc/Library/Caches/pip/wheels/18/7b/47/e71e02e453d133f161a94a9a0b84e9390048145be21799e1ac
    Successfully built py3exiv2
    Installing collected packages: py3exiv2
    Successfully installed py3exiv2-0.1.0
    et ensuite :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    $ python3
    Python 3.7.2 (default, Jan 13 2019, 12:50:01) 
    [Clang 10.0.0 (clang-1000.11.45.5)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import pyexiv2
    >>> metadata = pyexiv2.ImageMetadata('test.jpg')
    >>> metadata.read()
    >>> tag = metadata['Exif.Image.DateTime']
    >>> tag.raw_value
    '2008:07:19 14:12:01'
    >>>
    En résumé, le problème réside bien comme tu l'avais vu dans la bibliothéque exiv2 0.27.
    Comme brew ne permet plus d'installer d'ancienne version, les commandes pour récupérer la version 0.25 sont :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
     
    cd /usr/local//Homebrew/Library/Taps/homebrew/homebrew-core/Formula
    mv exiv2.rb exiv2.rb.save
    git checkout -b exiv2-0.25 d67311c # dernier argument trouvé dans les archive github des modules exiv2 de homebrew
    brew reinstall exiv2.rb
    brew switch exiv2 0.25
    On espère que cela pourra être utile à d'autres.
    Bonne journée

  19. #19
    Expert éminent

    Homme Profil pro
    Inscrit en
    Octobre 2008
    Messages
    4 298
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Belgique

    Informations forums :
    Inscription : Octobre 2008
    Messages : 4 298
    Points : 6 778
    Points
    6 778
    Par défaut
    OK, merci pour le retour.

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Problème d'installation oracle 8.1.7 sous NT
    Par Anonymous dans le forum Installation
    Réponses: 7
    Dernier message: 02/08/2002, 15h18
  2. Installer ses composants
    Par Geronimo dans le forum C++Builder
    Réponses: 14
    Dernier message: 18/06/2002, 15h51
  3. Réponses: 19
    Dernier message: 24/05/2002, 17h36
  4. Réponses: 7
    Dernier message: 01/05/2002, 21h23
  5. [Kylix] Comment installer Kylix sur Mandrake 8.2 (page2)
    Par Philippe LE PONT dans le forum EDI
    Réponses: 3
    Dernier message: 01/05/2002, 13h52

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo