Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 25/09/2021, à 06:49

duocore

(Resolu en partie] make install ne fonctionne pas pour sgfutils

Bonjour,
j'essaye d'installer sgf2pdf en suivant ceci : https://github.com/Cdric49/sgf2pdf

quand j'arrive à :

wget http://homepages.cwi.nl/~aeb/go/sgfutils/sgfutils.tgz
tar xzvfp sgfutils.tgz
cd sgfutils*
make
make install

tout fonctionne jusqu'a make

cc -Wall -Wmissing-prototypes -O3   -c -o sgf.o sgf.c
In file included from /usr/include/string.h:495,
                 from sgf.c:20:
In function ‘strncpy’,
    inlined from ‘xstrdup_len’ at sgf.c:186:2,
    inlined from ‘newprop_len’ at sgf.c:195:6,
    inlined from ‘parse_comment’ at sgf.c:313:6:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sgf.c: In function ‘parse_comment’:
sgf.c:312:10: note: length computed here
  312 |      m = strlen(res);
      |          ^~~~~~~~~~~
cc -Wall -Wmissing-prototypes -O3   -c -o errexit.o errexit.c
cc -Wall -Wmissing-prototypes -O3   -c -o readsgf.o readsgf.c
cc -Wall -Wmissing-prototypes -O3   -c -o xmalloc.o xmalloc.c
cc   sgf.o errexit.o readsgf.o xmalloc.o   -o sgf
cc -Wall -Wmissing-prototypes -O3   -c -o sgfsplit.o sgfsplit.c
cc   sgfsplit.o errexit.o   -o sgfsplit
cc -Wall -Wmissing-prototypes -O3   -c -o sgfvarsplit.o sgfvarsplit.c
cc   sgfvarsplit.o errexit.o xmalloc.o   -o sgfvarsplit
cc -Wall -Wmissing-prototypes -O3   -c -o sgfstrip.o sgfstrip.c
cc -Wall -Wmissing-prototypes -O3   -c -o writesgf.o writesgf.c
cc   sgfstrip.o errexit.o readsgf.o writesgf.o xmalloc.o   -o sgfstrip
cc -Wall -Wmissing-prototypes -O3   -c -o sgfinfo.o sgfinfo.c
cc -Wall -Wmissing-prototypes -O3   -c -o playgogame.o playgogame.c
cc -Wall -Wmissing-prototypes -O3   -c -o tests.o tests.c
cc -Wall -Wmissing-prototypes -O3   -c -o ftw.o ftw.c
cc -Wall -Wmissing-prototypes -O3 sgfinfo.o sgffileinput.c readsgf.o playgogame.o tests.o ftw.o xmalloc.o errexit.o -o sgfinfo -lcrypto
cc -Wall -Wmissing-prototypes -O3   -c -o sgfmerge.o sgfmerge.c
cc   sgfmerge.o errexit.o readsgf.o xmalloc.o   -o sgfmerge
cc -Wall -Wmissing-prototypes -O3   -c -o sgftf.o sgftf.c
cc   sgftf.o errexit.o readsgf.o ftw.o xmalloc.o   -o sgftf
cc -Wall -Wmissing-prototypes -O3   -c -o sgfcheck.o sgfcheck.c
cc -Wall -Wmissing-prototypes -O3   -c -o readsgf0.o readsgf0.c
cc   sgfcheck.o errexit.o readsgf0.o playgogame.o ftw.o xmalloc.o   -o sgfcheck
cc -Wall -Wmissing-prototypes -O3   -c -o sgfdb.o sgfdb.c
cc   sgfdb.o errexit.o readsgf.o playgogame.o ftw.o xmalloc.o   -o sgfdb
cc -Wall -Wmissing-prototypes -O3 -DREAD_FROM_DB -c sgfinfo.c -o sgfdbinfo.o
cc -Wall -Wmissing-prototypes -O3   -c -o sgfdbinput.o sgfdbinput.c
cc -Wall -Wmissing-prototypes -O3 sgfdbinfo.o sgfdbinput.o readsgf.o xmalloc.o tests.o ftw.o errexit.o -o sgfdbinfo -lcrypto
cc -Wall -Wmissing-prototypes -O3   -c -o sgfcharset.o sgfcharset.c
cc   sgfcharset.o errexit.o xmalloc.o   -o sgfcharset
cc -Wall -Wmissing-prototypes -O3   -c -o sgfcmp.o sgfcmp.c
cc   sgfcmp.o errexit.o readsgf.o xmalloc.o   -o sgfcmp
cc -Wall -Wmissing-prototypes -O3   -c -o sgfx.o sgfx.c
cc   sgfx.o errexit.o readsgf.o xmalloc.o   -o sgfx
cc -Wall -Wmissing-prototypes -O3   -c -o ngf2sgf.o ngf2sgf.c
cc   ngf2sgf.o errexit.o   -o ngf2sgf
cc -Wall -Wmissing-prototypes -O3   -c -o nip2sgf.o nip2sgf.c
cc   nip2sgf.o errexit.o   -o nip2sgf
cc -Wall -Wmissing-prototypes -O3   -c -o nk2sgf.o nk2sgf.c
cc   nk2sgf.o errexit.o readsgf.o writesgf.o xmalloc.o   -o nk2sgf
cc -Wall -Wmissing-prototypes -O3   -c -o gib2sgf.o gib2sgf.c
cc   gib2sgf.o errexit.o   -o gib2sgf
cc -Wall -Wmissing-prototypes -O3   -c -o sgftopng.o sgftopng.c
cc   sgftopng.o   -o sgftopng
cc -Wall -Wmissing-prototypes -O3    ugi2sgf.c   -o ugi2sgf

pour make install :

make: *** Aucune règle pour fabriquer la cible « install ». Arrêt.

merci pour votre aide

Dernière modification par duocore (Le 08/10/2023, à 22:31)

Hors ligne

#2 Le 25/09/2021, à 16:50

noje

Re : (Resolu en partie] make install ne fonctionne pas pour sgfutils

Le fichier make n'a simplement pas de règle pour installer les exécutables, tout peut se lancer du dossier.

La liste de tous les fichiers qui sont créés par le make, après ça ressemble à une suite de petits outils pour traiter les sgf.

ugi2sgf
sgftopng
gib2sgf
nk2sgf
nip2sgf
ngf2sgf
sgfx
sgfcmp
sgfcharset
sgfdbinfo
sgfdb
sgfcheck
sgftf
sgfmerge
sgfinfo

Et ils semblent bien fonctionner de prime abord :

./sgfinfo -help
Call: sgfinfo [options] [--] [file(s)]
 -nf: no filename
 -i: ignore errors
 -t: trace input

Select input file:
 -m#: game has # moves (-#, #-, #-#: at most, at least, ...)
 -p#X,Y,... : moves X, Y, ... were played at moves #
 -Bp#X, -Wp#X: idem for black/white moves
 -pat=file.sgf: find pattern
 -h#: game has handicap # (-#, #-, #-#)

Select game in a multi-game file:
 -x#: requested game number

Define and use reference file:
 -ref=FILE -propDT=@ (@: same as in FILE)

Transform game:
 -trunc#: truncate to # moves
 -tra#: apply rotation or reflection (#=0,...,7)
 -swapcolors (together with -pat): swap colors
 -alltra (together with -pat): try all 16 transformations

Print info:
 -N: print nr of games
 -m: print nr of moves
 -M: print moves
 -M#: print move #
 -s: print moves in a compact string
 -k: print move number where pattern (first) found
 -h: print handicap
 -md5: print md5 signature of moves (only)
 -can: print canonical signature of moves (only)
 -DsA (= -Ds20,40,60), -DsB (= -Ds31,51,71) Dyer signature
 -DnC (= -Dn20,40,60,31,51,71) normalized Dyer signature
 -propXY: print property labels XY
 -Bcapt, -Wcapt: print nr of captured B, W stones

- LTS 18.04 & 22.04 - jwm - cwm - zsh

Les seules vraies erreurs sont celles que nous commettons à répétition.
Les autres sont des occasions d'apprentissage. (Dalaï Lama)

Hors ligne

#3 Le 27/09/2021, à 06:52

duocore

Re : (Resolu en partie] make install ne fonctionne pas pour sgfutils

bonjour,
j'ai installer les programmes dans /usr/bin

quand je mets en ligne de commande :

./sgf2pdf.sh mon_fichier2.sgf 
"my" variable $VERSION masks earlier declaration in same scope at /usr/share/perl5/Games/Go/Sgf2Dg.pm line 29.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/perl5/Games/Go/Sgf2Dg.pm line 1416.

Unknown option: -longComments
sgf2dg [options] [file.sgf]

    -h | -help                 print this message and exit
    -v | -version              print version number and exit
    -verbose                   print diagnostic information
    -i | -in                   input file name (STDIN for standard input)
    -o | -out                  output file name (STDOUT for standard output)
    -t | -top                  top line in diagram
    -b | -bottom               bottom line in diagram
    -l | -left                 leftmost line in diagram
    -r | -right                rightmost line in diagram
    -crop                      auto-crop diagram
    -break | -breakList        a list of first move in each diagram
    -m | -movesPerDiagram      number of moves per diagram
    -d | -doubleDigits         label stones modulo 100
    -n | -newNumbers           begin each diagram with number 1
    -rv | -relativeVarNums     start each variation from 1
    -av | -absoluteVarNums     move numbers in variation == main line numbers
    -cv | -correlativeVarNums  start main variations from 1 
    -rl | -repeatLast          repeat last move as first in next diagram
    -ic | -ignoreComments      ignore SGF comments
    -il | -ignoreLetters       ignore SGF letters
    -im | -ignoreMarks         ignore SGF marks
    -iv | -ignoreVariations    ignore SGF variations
    -ip | -ignorePass          ignore SGF pass moves
    -ia | -ignoreAll           ignore SGF comments, letters, marks, variations, and passes
    -firstDiagram              first diagram to print
    -lastDiagram               last diagram to print
    -initialDiagram            print initial setup diagram
    -placeHandi                place handicap stones on board (old style)
    -coords                    print coordinates
    -cs | -coordStyle style    coordinate style: normal, sgf, or numeric
    -c | -convert | -converter name of a Diagram converter (see below)
    -simple                    use a very simple TeX format
    -mag number                TeX \magnification - default is 1000
    -twoColumn                 use two-column format
    -bigFonts                  use fonts magnified 1.2 times
    -texComments               \, {, and } in comments not modified
    -floatControl string       'string' controls float (diagram) placement

    The -i and -o options are not needed with normal usage:
             sgf2dg [options] name
 is equivalent to:
             sgf2dg [options] -i name -o name.tex 
 or          sgf2dg [options] -i name.sgf -o name.tex
 and         sgf2dg [options] name.

 for those of you who are fans of tab completion.

    The breakList consists of a comma-separated list of numbers (NO
 spaces). Each number will be the last move in one diagram.
 -movesPerDiagram sets an upper limit on the number of moves per
 diagram. The default movesPerDiagram is 50 unless a breakList
 (without -movesPerDiagram) is set, in which case movesPerDiagram is
 set to a very large number. -breakList and -movesPerDiagram may be
 combined.

    -doubleDigits and -newNumbers are alternative schemes for avoiding
 large numerals.  -doubleDigits limits stone numbers to be between 1
 and 100.  Stone number 101 prints as 1.  -newNumbers causes each
 diagram to start with number 1.

    If you use -doubleDigits and -repeatLast together, you'll get
 warnings because there is no font character for stones numbered 0.
 The diagrams with 100, 200, 300, etc. as the first move will
 complain, and those stones will show with their real numbers.

    By default, variation diagrams start with stone number 1
 (-relativeVarNums).  Alternatively, variation numbers can be the
 same as the numbers in the main diagram (-absoluteVarNums) or they
 can start from 1 at the beginning of each variation tree
 (-correlativeVarNums).

    -coords adds coordinates to right and bottom edges.

    -coordStyle style sets the coordinate style.  The default is
 normal which puts descending numbers on the vertical axis and ascending
 letters (skipping I) on the horizontal axis.  style may also be set to
 sgf to see the coordinates used inside the SGF file, or to one of:

    ++    ascending numbers on both axes (0,0 in upper left)
    +-    ascending x axis, descending y axis (0,0 in lower left)
    -+    both ascending numbers on both axes (0,0 in upper right)
    --    descending numbers on both axes (0,0 in lower right)

    Recent SGF formats require AB (add-black) to place handicap stones
 on the board.  Use -placeHandi for old style SGF files that don't
 contain the explicit AB notations.

    -converter changes the output converter.  The default converter
 is Games::Go::Sgf2Dg::Dg2Tex.  All converters get 'Games::Go::Sgf2Dg::Dg2'
 prepended, so you should enter only the part after Dg2.  The
 default is thus equivilent to '-converter TeX'.  Converters
 supplied with this release are (case sensitive):

    TeX       - Donald Knuth's typesetting language
    Mp        - MetaPost embedded in TeX (Encapsulated PostScript)
    ASCII     - ASCII art
    PDF       - Portable Document Format
    Ps        - PostScript
    Tk        - perl/Tk NoteBook window
    TkPs      - PostScript from the Tk NoteBook
    SL        - Sensei's Library (by Marcel Gruenauer)

    Example:    $ sgf2dg ... -converter ASCII ...

    See the perldoc or man pages for details on converter-specific
 options (eg: 'perldoc Games::Go::Sgf2Dg::Dg2TeX' or 'man Games::Go::Sgf2Dg::Dg2PDF').

    -simple (Dg2TeX) uses a very simple TeX format. This option may be
 useful if you intend to edit the resulting TeX file by hand.

    -mag (Dg2TeX) changes the default \magnification from 1000.

    -twoColumn (Dg2TeX) uses a two-column format with small fonts.

    -texComments (Dg2TeX) is appropriate if your sgf comments contain TeX.
 If this option is NOT used, \ { and } are replaced by /, [ and ]
 since these characters are not available in TeX roman fonts. If
 -texComments is used, these changes are not made, so you can add
 TeX code to {\bf change fonts} in your comments.

    -floatControl 'control_string' (Dg2TeX)
 Normally (not -simple and not -twoColumn), Dg2TeX floats the diagram to
 the left or the right of the accompanying text.  -floatControl allows you
 to specify the position of each diagram.  control_string is a sequence of
 letters which specify where each diagram should be positioned.  The
 letters may be:

        'l'  : diagram left
        'r'  : diagram right
        'a'  : alternate left and right
        other: random left or right

 control_string letters are consumed, one per diagram, until one letter is
 left.  The final letter is used for all remaining diagrams.

 The default control_string is 'rx' which places the first diagram on
 the right (text on the left) and all remaining diagrams are placed
 randomly.


    More details on sgf2dg can be found in the perldoc or man
 pages: 'perldoc sgf2dg' or 'man sgf2dg'.

par contre quand je n'avais pas mis sgfx dans usr/bin :

j'ai des erreurs, mais j'ai mon pdf:

./sgf2pdf.sh mon_fichier.sgf 
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
./sgf2pdf.sh: ligne 18: sgfx : commande introuvable
"my" variable $VERSION masks earlier declaration in same scope at /usr/share/perl5/Games/Go/Sgf2Dg.pm line 29.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/perl5/Games/Go/Sgf2Dg.pm line 1416.
Parsing Diagram 1 at move 0
Parsing Diagram 2 at move 50
Parsing Diagram 3 at move 100
Converting Diagram 1
Converting Diagram 2
Converting Diagram 3

Dernière modification par duocore (Le 27/09/2021, à 06:53)

Hors ligne

#4 Le 27/09/2021, à 07:54

FrancisFDZ

Re : (Resolu en partie] make install ne fonctionne pas pour sgfutils

Bonjour,
Les spécialistes de la programmation (dont je ne fais pas partie) peuvent confirmer , "make install" n'est pas une option systématique de make. Les différentes commandes de make sont dans un fichier "makefile", et dépendent du programmeur. Il y a souvent "install", mais ce n'est pas obligatoire, par contre ce qui est obligatoire c'est de lancer "make install" (si install existe) en mode admin, autrement dit avec "sudo", pour la bonne raison que l'installation se fait dans des répertoires systèmes dont l'utilisateur courant n'a pas l'accès en écriture.
On peut vérifier dans un premier temps qu'il existe bien une option "install" dans un fichier makefile, et si oui ne pas oublier le sudo :

sudo make install

-- On peut avoir des raisons de se plaindre et n'avoir pas raison de se plaindre --
[Victor Hugo]

Hors ligne

#5 Le 27/09/2021, à 08:06

Hizoka

Re : (Resolu en partie] make install ne fonctionne pas pour sgfutils

Salut

Oui c'est normal,

il te dit qu'il ne trouve pas la commande sgfx, car elle n'est pas dans le PATH (un dossier où le système va chercher les exécutables).

Maintenant que tu as mis toutes les commandes dans /usr/bin, dossier faisant parti du PATH, il la trouve.

Il est déconseillé de balancer des exécutables dans /usr/bin, utilise un dossier local (genre ~/.local/bin) ou au pire /usr/local/bin.

Pour voir les dossiers du PATH :

echo $PATH

https://doc.ubuntu-fr.org/personnaliser_path


KDE Neon 64bits
Tous mes softs (MKVExtractorQt, HizoSelect, HizoProgress, Qtesseract, Keneric, Services menus...) sont sur github

En ligne

#6 Le 27/09/2021, à 20:27

duocore

Re : (Resolu en partie] make install ne fonctionne pas pour sgfutils

j'ai mis les fichiers dans ~/.local/bin

./sgf2pdf file.sgf

mais j'ai ceci comme erreur :

"my" variable $VERSION masks earlier declaration in same scope at /usr/share/perl5/Games/Go/Sgf2Dg.pm line 29.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/perl5/Games/Go/Sgf2Dg.pm line 1416.

Unknown option: -longComments
sgf2dg [options] [file.sgf]

    -h | -help                 print this message and exit
    -v | -version              print version number and exit
    -verbose                   print diagnostic information
    -i | -in                   input file name (STDIN for standard input)
    -o | -out                  output file name (STDOUT for standard output)
    -t | -top                  top line in diagram
    -b | -bottom               bottom line in diagram
    -l | -left                 leftmost line in diagram
    -r | -right                rightmost line in diagram
    -crop                      auto-crop diagram
    -break | -breakList        a list of first move in each diagram
    -m | -movesPerDiagram      number of moves per diagram
    -d | -doubleDigits         label stones modulo 100
    -n | -newNumbers           begin each diagram with number 1
    -rv | -relativeVarNums     start each variation from 1
    -av | -absoluteVarNums     move numbers in variation == main line numbers
    -cv | -correlativeVarNums  start main variations from 1 
    -rl | -repeatLast          repeat last move as first in next diagram
    -ic | -ignoreComments      ignore SGF comments
    -il | -ignoreLetters       ignore SGF letters
    -im | -ignoreMarks         ignore SGF marks
    -iv | -ignoreVariations    ignore SGF variations
    -ip | -ignorePass          ignore SGF pass moves
    -ia | -ignoreAll           ignore SGF comments, letters, marks, variations, and passes
    -firstDiagram              first diagram to print
    -lastDiagram               last diagram to print
    -initialDiagram            print initial setup diagram
    -placeHandi                place handicap stones on board (old style)
    -coords                    print coordinates
    -cs | -coordStyle style    coordinate style: normal, sgf, or numeric
    -c | -convert | -converter name of a Diagram converter (see below)
    -simple                    use a very simple TeX format
    -mag number                TeX \magnification - default is 1000
    -twoColumn                 use two-column format
    -bigFonts                  use fonts magnified 1.2 times
    -texComments               \, {, and } in comments not modified
    -floatControl string       'string' controls float (diagram) placement

    The -i and -o options are not needed with normal usage:
             sgf2dg [options] name
 is equivalent to:
             sgf2dg [options] -i name -o name.tex 
 or          sgf2dg [options] -i name.sgf -o name.tex
 and         sgf2dg [options] name.

 for those of you who are fans of tab completion.

    The breakList consists of a comma-separated list of numbers (NO
 spaces). Each number will be the last move in one diagram.
 -movesPerDiagram sets an upper limit on the number of moves per
 diagram. The default movesPerDiagram is 50 unless a breakList
 (without -movesPerDiagram) is set, in which case movesPerDiagram is
 set to a very large number. -breakList and -movesPerDiagram may be
 combined.

    -doubleDigits and -newNumbers are alternative schemes for avoiding
 large numerals.  -doubleDigits limits stone numbers to be between 1
 and 100.  Stone number 101 prints as 1.  -newNumbers causes each
 diagram to start with number 1.

    If you use -doubleDigits and -repeatLast together, you'll get
 warnings because there is no font character for stones numbered 0.
 The diagrams with 100, 200, 300, etc. as the first move will
 complain, and those stones will show with their real numbers.

    By default, variation diagrams start with stone number 1
 (-relativeVarNums).  Alternatively, variation numbers can be the
 same as the numbers in the main diagram (-absoluteVarNums) or they
 can start from 1 at the beginning of each variation tree
 (-correlativeVarNums).

    -coords adds coordinates to right and bottom edges.

    -coordStyle style sets the coordinate style.  The default is
 normal which puts descending numbers on the vertical axis and ascending
 letters (skipping I) on the horizontal axis.  style may also be set to
 sgf to see the coordinates used inside the SGF file, or to one of:

    ++    ascending numbers on both axes (0,0 in upper left)
    +-    ascending x axis, descending y axis (0,0 in lower left)
    -+    both ascending numbers on both axes (0,0 in upper right)
    --    descending numbers on both axes (0,0 in lower right)

    Recent SGF formats require AB (add-black) to place handicap stones
 on the board.  Use -placeHandi for old style SGF files that don't
 contain the explicit AB notations.

    -converter changes the output converter.  The default converter
 is Games::Go::Sgf2Dg::Dg2Tex.  All converters get 'Games::Go::Sgf2Dg::Dg2'
 prepended, so you should enter only the part after Dg2.  The
 default is thus equivilent to '-converter TeX'.  Converters
 supplied with this release are (case sensitive):

    TeX       - Donald Knuth's typesetting language
    Mp        - MetaPost embedded in TeX (Encapsulated PostScript)
    ASCII     - ASCII art
    PDF       - Portable Document Format
    Ps        - PostScript
    Tk        - perl/Tk NoteBook window
    TkPs      - PostScript from the Tk NoteBook
    SL        - Sensei's Library (by Marcel Gruenauer)

    Example:    $ sgf2dg ... -converter ASCII ...

    See the perldoc or man pages for details on converter-specific
 options (eg: 'perldoc Games::Go::Sgf2Dg::Dg2TeX' or 'man Games::Go::Sgf2Dg::Dg2PDF').

    -simple (Dg2TeX) uses a very simple TeX format. This option may be
 useful if you intend to edit the resulting TeX file by hand.

    -mag (Dg2TeX) changes the default \magnification from 1000.

    -twoColumn (Dg2TeX) uses a two-column format with small fonts.

    -texComments (Dg2TeX) is appropriate if your sgf comments contain TeX.
 If this option is NOT used, \ { and } are replaced by /, [ and ]
 since these characters are not available in TeX roman fonts. If
 -texComments is used, these changes are not made, so you can add
 TeX code to {\bf change fonts} in your comments.

    -floatControl 'control_string' (Dg2TeX)
 Normally (not -simple and not -twoColumn), Dg2TeX floats the diagram to
 the left or the right of the accompanying text.  -floatControl allows you
 to specify the position of each diagram.  control_string is a sequence of
 letters which specify where each diagram should be positioned.  The
 letters may be:

        'l'  : diagram left
        'r'  : diagram right
        'a'  : alternate left and right
        other: random left or right

 control_string letters are consumed, one per diagram, until one letter is
 left.  The final letter is used for all remaining diagrams.

 The default control_string is 'rx' which places the first diagram on
 the right (text on the left) and all remaining diagrams are placed
 randomly.


    More details on sgf2dg can be found in the perldoc or man
 pages: 'perldoc sgf2dg' or 'man sgf2dg'.

Merci pour votre aide

Dernière modification par duocore (Le 28/09/2021, à 07:15)

Hors ligne

#7 Le 27/09/2021, à 22:01

Hizoka

Re : (Resolu en partie] make install ne fonctionne pas pour sgfutils

Comme dans ton message 3, il te dit que l'option -longargument n'existe pas...

Unknown option: -longComments

Ça sent le bonhomme qui ne sait pas ce qu'il fait ça wink

Et avant de mettre le résultat d'une commande, il faut toujours montrer la commande exécutée.

Cela permettrait de voir que tu exécutes le script avec l'option -longargument alors même que l'aide n'en parle pas.

Long argument veut dire... argument long, soit dans le cas de -r | -right, c'est -right.
Et l'argument court serait -r.


KDE Neon 64bits
Tous mes softs (MKVExtractorQt, HizoSelect, HizoProgress, Qtesseract, Keneric, Services menus...) sont sur github

En ligne

#8 Le 28/09/2021, à 07:23

duocore

Re : (Resolu en partie] make install ne fonctionne pas pour sgfutils

-longComments concerne le logiciel sgf2dg comme on peut le voir dans le script de sgf2pdf :

#!/bin/bash
#
# sgf2pdf.sh <sgf file>
#

type sgfinfo >/dev/null 2>&1 || { echo >&2 "I require sgfinfo but it's not installed. Aborting."; exit 1; }
type sgf2dg >/dev/null 2>&1 || { echo >&2 "I require sgf2dg but it's not installed. Aborting."; exit 1; }
usage()
{
  echo "Usage: $0 <sgf file>"
  exit 1
}

[[ $# -ne 1 ]] && usage
MAX=$(sgfinfo -m $1| cut -d' ' -f1)
for move in `seq 0 ${MAX}`;
  do
    comment=$(sgfx -m${move} -propC $1 )
    if [ ! -z "${comment}" ]
    then
      if [ -z "${BREAK}" ]
      then
        BREAK=${move}
      else
        BREAK="${BREAK},${move}"
      fi
    fi
  done
sgf2dg -movesPerDiagram 50 \
    -breakList ${BREAK} \
    -longComments \
    -coords \
    -convert PDF "-PDF-pageSize a4" "-PDF-stone_fontSize 9" "-PDF-stone_fontName Helvetica-Bold" "$1"

Je pense que le probleme doit venir de sgf2dg.
Et en plus ce qui est des plus étrange ; c'est que si j’enlève sgfx j'ai une erreur mais mon fichier pdf est créé, alors que si sgfx est present j'ai cette erreur mais le fichier pdf n'est pas créé.

Hors ligne

#9 Le 28/09/2021, à 08:07

Hizoka

Re : (Resolu en partie] make install ne fonctionne pas pour sgfutils

Ah ok, je suis peut être allé un peu vite wink

Supprime simplement l'argument -longComments de la commande du coup si c'est lui qui pose problème.

sgfx est utilisé pour l'option -breakList : a list of first move in each diagram
Je ne sais pas ce que ça veut dire exactement.
Du coup, si tu vires la boucle, il te faut virer l'argument et sa valeur -breakList ${BREAK} pour ne pas avoir de message d'erreur (enfin je présume que c'est lié vu ce que tu dis mais sans message sous les yeux...)

Mais il semble bancal ce code, genre :

[ ! -z "${comment}" ]

Une sorte de double négation... c'est fonctionnel mais bon...

MAX=$(sgfinfo -m $1| cut -d' ' -f1)
for move in `seq 0 ${MAX}`;

Utilisation de $() puis de ` `...

Dernière modification par Hizoka (Le 28/09/2021, à 08:09)


KDE Neon 64bits
Tous mes softs (MKVExtractorQt, HizoSelect, HizoProgress, Qtesseract, Keneric, Services menus...) sont sur github

En ligne

#10 Le 28/09/2021, à 08:09

FrancisFDZ

Re : (Resolu en partie] make install ne fonctionne pas pour sgfutils

Hizoka a écrit :

Long argument veut dire... argument long, soit dans le cas de -r | -right, c'est -right.
Et l'argument court serait -r.

Attention : dans cet exemple, l'"argument long" "-right" est interprété comme une suite d'arguments courts (mono-caractères), soit :
"-right" = "-r -i -g -h -t". Pour avoir explicitement un "argument long", il faut employer le double tiret ; "--right"

Dernière modification par FrancisFDZ (Le 28/09/2021, à 08:10)


-- On peut avoir des raisons de se plaindre et n'avoir pas raison de se plaindre --
[Victor Hugo]

Hors ligne

#11 Le 28/09/2021, à 08:29

Hizoka

Re : (Resolu en partie] make install ne fonctionne pas pour sgfutils

FrancisFDZ : Non, n'en sois pas si sûr, ça dépend entièrement du fonctionnement du logiciel.

C'est souvent le cas, on est d'accord mais quand tu vois l'aide du logiciel ça ne l'est pas ici :

    -break | -breakList        a list of first move in each diagram
    -m | -movesPerDiagram      number of moves per diagram
    -d | -doubleDigits         label stones modulo 100
    -n | -newNumbers           begin each diagram with number 1

Il ne fait surement que lire les arguments passés à la commande dans un case, pas d'utilisation de getopt par ex.

Dernière modification par Hizoka (Le 28/09/2021, à 08:31)


KDE Neon 64bits
Tous mes softs (MKVExtractorQt, HizoSelect, HizoProgress, Qtesseract, Keneric, Services menus...) sont sur github

En ligne

#12 Le 29/09/2021, à 21:34

duocore

Re : (Resolu en partie] make install ne fonctionne pas pour sgfutils

j'ai enlevé -longComments.
en utilisant ./sgf2pdf fichier.sgf :

j'ai mon fichier pdf qui est créé, mais j'ai une erreur avant :

"my" variable $VERSION masks earlier declaration in same scope at /usr/share/perl5/Games/Go/Sgf2Dg.pm line 29.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/perl5/Games/Go/Sgf2Dg.pm line 1416.
Parsing Diagram 1 at move 0
Parsing Diagram 2 at move 50
Parsing Diagram 3 at move 100
Parsing Diagram 4 at move 150
Converting Diagram 1
Converting Diagram 2
Converting Diagram 3
Converting Diagram 4

Hors ligne

#13 Le 29/09/2021, à 21:59

Hizoka

Re : (Resolu en partie] make install ne fonctionne pas pour sgfutils

Les 2 premières lignes sont présentes dans tous tes retours...
il indique des erreurs ligne 29 et 1416...

Mais va-t-en savoir le problème sans connaitre le script et son fonctionnement...

Tant qu'il te crée ton fichier...


KDE Neon 64bits
Tous mes softs (MKVExtractorQt, HizoSelect, HizoProgress, Qtesseract, Keneric, Services menus...) sont sur github

En ligne