Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Installer fails when trying to apply patch #13

Closed
ohle opened this issue Feb 5, 2019 · 10 comments
Closed

Installer fails when trying to apply patch #13

ohle opened this issue Feb 5, 2019 · 10 comments

Comments

@ohle
Copy link

ohle commented Feb 5, 2019

claussen@ohle:~/gocode/src/github.com/isacikgoz/gitin $ make install
git submodule -q foreach --recursive git reset -q --hard
git submodule update --init --recursive
if patch --dry-run -N -d /home/claussen/gocode/src/gopkg.in/libgit2/git2go.v27 -p1 < git2go.v27.patch >/dev/null; then \
		patch -d /home/claussen/gocode/src/gopkg.in/libgit2/git2go.v27 -p1 < git2go.v27.patch; \
	fi
/bin/sh: git2go.v27.patch: No such file or directory
make -C /home/claussen/gocode/src/gopkg.in/libgit2/git2go.v27 install-static
make[1]: Entering directory `/home/claussen/gocode/src/gopkg.in/libgit2/git2go.v27'
./script/build-libgit2-static.sh
+ VENDORED_PATH=vendor/libgit2
+ cd vendor/libgit2
+ mkdir -p install/lib
+ mkdir -p build
+ cd build
+ cmake -DTHREADSAFE=ON -DBUILD_CLAR=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS=-fPIC -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=../install ..
CMake Error: The source directory "/home/claussen/gocode/src/gopkg.in/libgit2/git2go.v27/vendor/libgit2" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
make[1]: *** [build-libgit2] Error 1
make[1]: Leaving directory `/home/claussen/gocode/src/gopkg.in/libgit2/git2go.v27'
make: *** [build-libgit2] Error 2

@isacikgoz
Copy link
Owner

hi @ohle thanks for the feedback. Can you try it again after you pull #15 ?

@ohle
Copy link
Author

ohle commented Feb 6, 2019

The patch applies now, but the CMake error in libgit2 is still there:

git submodule -q foreach --recursive git reset -q --hard
git submodule update --init --recursive
if patch --dry-run -N -d /home/claussen/gocode/src/gopkg.in/libgit2/git2go.v27 -p1 < patch/git2go.v27.patch >/dev/null; then \
		patch -d /home/claussen/gocode/src/gopkg.in/libgit2/git2go.v27 -p1 < patch/git2go.v27.patch; \
	fi
patching file script/build-libgit2-static.sh
make -C /home/claussen/gocode/src/gopkg.in/libgit2/git2go.v27 install-static
make[1]: Entering directory `/home/claussen/gocode/src/gopkg.in/libgit2/git2go.v27'
./script/build-libgit2-static.sh
+ VENDORED_PATH=vendor/libgit2
+ cd vendor/libgit2
+ mkdir -p install/lib
+ mkdir -p build
+ cd build
+ cmake -DTHREADSAFE=ON -DBUILD_CLAR=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS=-fPIC -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=../install -DUSE_EXT_HTTP_PARSER=OFF -DUSE_HTTPS=OFF -DUSE_NSEC=OFF -DUSE_SSH=OFF -DCURL=OFF -DUSE_GSSAPI=OFF -DUSE_BUNDLED_ZLIB=ON ..
CMake Error: The source directory "/home/claussen/gocode/src/gopkg.in/libgit2/git2go.v27/vendor/libgit2" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
make[1]: *** [build-libgit2] Error 1
make[1]: Leaving directory `/home/claussen/gocode/src/gopkg.in/libgit2/git2go.v27'
make: *** [build-libgit2] Error 2

@isacikgoz
Copy link
Owner

hi @ohle , does $GOPATH/src/gopkg.in/libgit2/git2go.v27/vendor/libgit2 folder exists? Because libgit2 itself should contain CMakeLists.txt file.

Somehow it can be failing on initializing

gitin/Makefile

Line 43 in 680b327

git submodule -q foreach --recursive git reset -q --hard
and

gitin/Makefile

Line 44 in 680b327

git submodule update --init --recursive

@ohle
Copy link
Author

ohle commented Feb 6, 2019

That was the problem. I don't know why those lines seemed to fail silently, but manually initializing the submodules in libgit2 helped.

However, now I seem to get linker errors:

[...]
go install --tags "static" ./...
can't load package: package gopkg.in/libgit2/git2go.v27: /home/claussen/gocode/src/gopkg.in/libgit2/git2go.v27/git_static.go: malformed #cgo argument: -I${SRCDIR}/vendor/libgit2/include
make[1]: *** [install-static] Error 1
make[1]: Leaving directory `/home/claussen/gocode/src/gopkg.in/libgit2/git2go.v27'
make: *** [build-libgit2] Error 2

@ghost
Copy link

ghost commented Feb 12, 2019

https://github.com/isacikgoz/gitin#installation, make sure cmake and pkg-config installed.

@ohle
Copy link
Author

ohle commented Feb 14, 2019

They are installed.

I'm closing this bug now because, while I still get the above errors, I can't reproduce them in a clean ubuntu docker.

BTW, @isacikgoz is there any reason the 0.1.5 release came without linux binaries?

@ohle ohle closed this as completed Feb 14, 2019
@isacikgoz
Copy link
Owner

isacikgoz commented Feb 14, 2019

Ah, sorry @ohle It will be added in a few hours, I was having some issues with my Linux machine.

Edit: Added 👍

@lk-chen
Copy link

lk-chen commented Feb 20, 2019

I get into the same issue: CMakeLists.txt missing in libgit2.

The folder has 2 subdirs: build/ and install/

@isacikgoz
Copy link
Owner

hello @lk-chen CMakeLists.txt should be in libgit2 folder. If it is not, it may be a problem with git clone or git submodule commands. Maybe you can try to manually initialize submodules in $GOPATH/src/gopkg.in/libgit2/git2go

After that, you can build libgit2 with running ./script/install-libgit2.sh in the git2go folder. After these steps you should be able to go build in gitin folder.

@lk-chen
Copy link

lk-chen commented Feb 21, 2019

I retried the git submodule commands above and got no luck. Then I tried go get -d github.com/isacikgoz/gitin again, and it works fine now.

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

No branches or pull requests

3 participants