Menu

#2016 Cannot compile git-snapshotI

None
closed
nobody
None
2023-01-16
2018-01-30
No

I download the snapshot of git version of gnuplot from "gnuplot-main" git repository. And then run prepare and configure. But make stopped:

cut: ../.git/HEAD: No such file or directory
make: *** No rule to make target ../.git/', needed bytimestamp.h'. Stop.

What should I do ?

If the directory .git is lacked in the snapshot and needed for compilation, I think the prepare script should make it.

Discussion

  • Ethan Merritt

    Ethan Merritt - 2018-01-30

    I don't know.
    Good question.
    I do not know exactly what script is used to prepare the snapshot. The snapshot is provided directly by the SourceForge site infrastructure. It is not something that we made.

     
  • Shigeharu TAKENO

    Thanks for reply.
    I did:

    mkdir .git
    touch .git/HEAD
    ./configure --prefix=...
    cat <<EOF> src/timestamp.h

    ifndef GNUPLOT_TIMEBASE_H_INCLUDED

    define GNUPLOT_TIMEBASE_H_INCLUDED

    const char gnuplot_date[] = "`date +'%Y-%m-%d' ";

    endif / GNUPLOT_TIMEBASE_H_INCLUDED /

    EOF
    make

    Then we could build from git snapshot.

     
  • gbm

    gbm - 2018-01-31

    The code snapshots downloaded from sourceforge git repos do contain following info:
    1. Project name
    2. Git repo name
    3. Git hash
    4. Commit date

    The snapshot is downloaded as a zip file with name 'ProjectName-GitRepoName-GitHash.zip'.
    When unzipped, source files are extracted to the folder 'ProjectName-GitRepoName-GitHash'
    All the files in the snapshot have the commit date as modification timestamp.

    The attached patch, applied before 'prepare', allows to compile gnuplot from a downloaded snapshot,
    and sets 'gnuplot_date' to 'CommitDate [GitHash]'.

    As an example, to compile current head ([ec78df5]), from downloaded gnuplot-gnuplot-main-ec78df5bd0562bf97dbab1b1d5d9aac290008704.zip i did:

    unzip gnuplot-gnuplot-main-ec78df5bd0562bf97dbab1b1d5d9aac290008704.zip
    cd gnuplot-gnuplot-main-ec78df5bd0562bf97dbab1b1d5d9aac290008704
    patch -p1 < build-from-downloaded-git-snapshot.patch
    ./prepare
    ./configure
    make

    The obtained gnuplot, identifies itself with "Version 5.3 patchlevel 0 last modified 2018-01-30 [ec78df5]"

    Miquel

     
  • Shigeharu TAKENO

    Thanks for reply.
    It is good idea to patch src/Makefile.am before running pepare script.
    But on my Solaris 10 machine, your patch may fail since it does not have stat command.
    And I also change the long directory name of snapshot to short name before the compile,
    so I can't get head string like "ec78df5".

    Well, I use the similar patch to yours, to get date by date command. Thanks.

     
  • Ethan Merritt

    Ethan Merritt - 2023-01-16
    • status: open --> closed
    • Group: -->
    • Priority: -->
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.