Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Trying to push updated submodule containing pcre #26

Closed
AndreMikulec opened this issue Feb 5, 2020 · 3 comments
Closed

Trying to push updated submodule containing pcre #26

AndreMikulec opened this issue Feb 5, 2020 · 3 comments

Comments

@AndreMikulec
Copy link

Hello @jeroen

Sorry, to bother you again.

I am trying to push this(below) rwinlib/base/commit submodule commit, from my local machine back up to github.

Update baselibs to include pcre2
d9107a3

I seem to have pulled it. The work log below may show that.

I am stuck and without that commit, every build of R development ends the same way.

C:/Rtools/mingw_32/bin/gcc -std=gnu99  -I. -I../include -DHAVE_CONFIG_H -DR_DLL_BUILD -DR_ARCH='"i386"' -DPCRE2_STATIC -I../extra -I../gnuwin32 -I"C:/projects/BUILD/R-source-win32/extsoft"/include -O3 -Wall -pedantic -mfpmath=sse -msse2 -march=corei7 -mavx -mavx2   -c grep.c -o grep.o
grep.c:74:19: fatal error: pcre2.h: No such file or directory
 # include<pcre2.h>
                   ^
compilation terminated.

I am following the official documentation here
https://git-scm.com/book/en/v2/Git-Tools-Submodules

I am stuck.
What do I need to do next?
(How do I push the submodule changes back up to github?)
Thanks.

Here is the work log
Again, I basically followed
https://git-scm.com/book/en/v2/Git-Tools-Submodules

ComputerUser@COMPUTERT MINGW64 ~/GitHub/base (master)
$ cd baselibs

ComputerUser@COMPUTERT MINGW64 ~/GitHub/base/baselibs ((v3.5.0))
$ git fetch
remote: Enumerating objects: 3, done.
remote: Counting objects: 100% (3/3), done.
remote: Total 9 (delta 3), reused 3 (delta 3), pack-reused 6
Unpacking objects: 100% (9/9), done.
From https://github.com/rwinlib/baselibs
   bb8cfa2..1164444  master     -> origin/master

ComputerUser@COMPUTERT MINGW64 ~/GitHub/base/baselibs ((v3.5.0))
$ git merge origin/master
Updating bb8cfa2..1164444
Fast-forward
 include/pcre2.h       | 978 ++++++++++++++++++++++++++++++++++++++++++++++++++
 lib/i386/libpcre2-8.a | Bin 0 -> 655950 bytes
 lib/x64/libpcre2-8.a  | Bin 0 -> 685000 bytes
 3 files changed, 978 insertions(+)
 create mode 100644 include/pcre2.h
 create mode 100644 lib/i386/libpcre2-8.a
 create mode 100644 lib/x64/libpcre2-8.a

ComputerUser@COMPUTERT MINGW64 ~/GitHub/base (master)
$ git diff --submodule
Submodule baselibs bb8cfa2..1164444:
  > add pcre2

ComputerUser@COMPUTERT MINGW64 ~/GitHub/base (master)
$ git status
On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   baselibs (new commits)

no changes added to commit (use "git add" and/or "git commit -a")

ComputerUser@COMPUTERT MINGW64 ~/GitHub/base (master)
$ git submodule update --remote
remote: Enumerating objects: 11, done.
remote: Counting objects: 100% (11/11), done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 11 (delta 5), reused 11 (delta 5), pack-reused 0
Unpacking objects: 100% (11/11), done.
From https://github.com/rwinlib/cairo
 * [new branch]      gdtools      -> origin/gdtools
 * [new tag]         v1.15.10-old -> v1.15.10-old
 * [new tag]         v1.16.0      -> v1.16.0
remote: Enumerating objects: 8, done.
remote: Counting objects: 100% (8/8), done.
remote: Total 29 (delta 8), reused 8 (delta 8), pack-reused 21
Unpacking objects: 100% (29/29), done.
From https://github.com/rwinlib/libcurl
   81acb73..3048252  master     -> origin/master
 * [new tag]         v7.64.1    -> v7.64.1
Submodule path 'libcurl': checked out '30482527dcc60c06c3a795246dc7c6aefafdc888'
From https://github.com/rwinlib/tcltk
 * [new tag]         bdr        -> bdr

ComputerUser@COMPUTERT MINGW64 ~/GitHub/base (master)
$ git submodule update --init --recursive
Submodule path 'baselibs': checked out 'bb8cfa25fcb61b372e8bc9410facf18b72479e7c'
Submodule path 'libcurl': checked out '81acb73da2cd9ba90959185ed149320b75cd64fe'

ComputerUser@COMPUTERT MINGW64 ~/GitHub/base (master)
$ git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean

ComputerUser@COMPUTERT MINGW64 ~/GitHub/base (master)
$ cd baselibs

ComputerUser@COMPUTERT MINGW64 ~/GitHub/base/baselibs ((v3.5.0))
$ git status
HEAD detached at bb8cfa2
nothing to commit, working tree clean

ComputerUser@COMPUTERT MINGW64 ~/GitHub/base/baselibs ((v3.5.0))
$ git checkout

ComputerUser@COMPUTERT MINGW64 ~/GitHub/base/baselibs ((v3.5.0))
$ git status
HEAD detached at bb8cfa2
nothing to commit, working tree clean

ComputerUser@COMPUTERT MINGW64 ~/GitHub/base/baselibs ((v3.5.0))
$ git submodule update --remote --merge

ComputerUser@COMPUTERT MINGW64 ~/GitHub/base/baselibs ((v3.5.0))
$ cd -

ComputerUser@COMPUTERT MINGW64 ~/GitHub/base (master)
$ git push --recurse-submodules=check
Everything up-to-date

ComputerUser@COMPUTERT MINGW64 ~/GitHub/base (master)
$  git push --recurse-submodules=on-demand
Everything up-to-date
@AndreMikulec
Copy link
Author

I am a little further now.

All you need to do is, (but MORE is required)

git submodule update --remote --merge

by Simba April 8 2019
Why is my Git Submodule HEAD detached from master?
https://stackoverflow.com/questions/18770545/why-is-my-git-submodule-head-detached-from-master

AnonymousUser@ANONYMOUST MINGW64 ~/GitHub/base (master)
$ git submodule update --remote --merge
Updating bb8cfa2..1164444
Fast-forward
 include/pcre2.h       | 978 ++++++++++++++++++++++++++++++++++++++++++++++++++
 lib/i386/libpcre2-8.a | Bin 0 -> 655950 bytes
 lib/x64/libpcre2-8.a  | Bin 0 -> 685000 bytes
 3 files changed, 978 insertions(+)
 create mode 100644 include/pcre2.h
 create mode 100644 lib/i386/libpcre2-8.a
 create mode 100644 lib/x64/libpcre2-8.a
Submodule path 'baselibs': merged in '1164444652aa1e2b3577a179c93e4aa2160eb2ad'
Updating 81acb73..3048252
Fast-forward
 PKGBUILD                     | 123 -------------------------------------------
 README.md                    |  12 +++++
 include/curl/curl.h          | 108 +++++++++++++++++++++++++++++++++----
 include/curl/curlver.h       |  14 ++---
 include/curl/easy.h          |  10 ++++
 include/curl/system.h        |  26 +++++++--
 include/curl/typecheck-gcc.h |  10 ++--
 include/curl/urlapi.h        | 122 ++++++++++++++++++++++++++++++++++++++++++
 lib/i386/libcrypto.a         | Bin 2934294 -> 4245420 bytes
 lib/i386/libcurl-dualssl.a   | Bin 786394 -> 0 bytes
 lib/i386/libcurl.a           | Bin 0 -> 838854 bytes
 lib/i386/libssh2.a           | Bin 230436 -> 236822 bytes
 lib/i386/libssl.a            | Bin 541296 -> 798866 bytes
 lib/x64/libcrypto.a          | Bin 3802396 -> 4498664 bytes
 lib/x64/libcurl-dualssl.a    | Bin 820806 -> 0 bytes
 lib/x64/libcurl.a            | Bin 0 -> 870914 bytes
 lib/x64/libssh2.a            | Bin 225416 -> 232218 bytes
 lib/x64/libssl.a             | Bin 597956 -> 817246 bytes
 rtools32.sh                  |  19 -------
 rtools64.sh                  |  19 -------
 20 files changed, 280 insertions(+), 183 deletions(-)
 delete mode 100644 PKGBUILD
 create mode 100644 README.md
 create mode 100644 include/curl/urlapi.h
 delete mode 100644 lib/i386/libcurl-dualssl.a
 create mode 100644 lib/i386/libcurl.a
 delete mode 100644 lib/x64/libcurl-dualssl.a
 create mode 100644 lib/x64/libcurl.a
 delete mode 100644 rtools32.sh
 delete mode 100644 rtools64.sh
Submodule path 'libcurl': merged in '30482527dcc60c06c3a795246dc7c6aefafdc888'

AnonymousUser@ANONYMOUST MINGW64 ~/GitHub/base (master)
$

AnonymousUser@ANONYMOUST MINGW64 ~/GitHub/base (master)
$ git submodule status
+1164444652aa1e2b3577a179c93e4aa2160eb2ad baselibs (v3.5.0-1-g1164444)
 1ddd5d1526bcba09766d5a0c317dc1c6faf81566 cairo (v1.16.0)
+30482527dcc60c06c3a795246dc7c6aefafdc888 libcurl (v7.64.1)
 b0526c5a186bfd92a63ecd0eee2734f4cb03d1b0 tcltk (bdr)

AnonymousUser@ANONYMOUST MINGW64 ~/GitHub/base (master)
$ git push --recurse-submodules=check
Everything up-to-date

AnonymousUser@ANONYMOUST MINGW64 ~/GitHub/base (master)
$ cd baselibs

AnonymousUser@ANONYMOUST MINGW64 ~/GitHub/base/baselibs ((1164444...))  *** NEW: CORRET ***
$ git status
HEAD detached from bb8cfa2              *** I AM *STILL* HERE ***
nothing to commit, working tree clean

So commit 1164444 is now recognized.
However, I am still on commit bb8cfa2

My baselibs\config looks like

C:\Users\AnonymousUser\GitHub\base\.git\modules\baselibs\config

[core]
	repositoryformatversion = 0
	filemode = false
	bare = false
	logallrefupdates = true
	symlinks = false
	ignorecase = true
	worktree = ../../../baselibs
[remote "origin"]
	url = https://github.com/rwinlib/baselibs
	fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
	remote = origin
	merge = refs/heads/master

Any ideas? Anyone?

@AndreMikulec
Copy link
Author

With the help of the Git Extensons GUI, I went through some git razzle dazzle; I ended up with a branch called "master" at commit bb8cfa2

Therefore, I effectively gave THAT detached HEAD a branch name of "master"

AnonymousUser@ANONYMOUST MINGW64 ~/GitHub/base/baselibs (master)

Next, I did a git pull. . . .

AnonymousUser@ANONYMOUST MINGW64 ~/GitHub/base/baselibs (master)
$ git pull
Updating bb8cfa2..1164444
Fast-forward
 include/pcre2.h       | 978 ++++++++++++++++++++++++++++++++++++++++++++++++++
 lib/i386/libpcre2-8.a | Bin 0 -> 655950 bytes
 lib/x64/libpcre2-8.a  | Bin 0 -> 685000 bytes
 3 files changed, 978 insertions(+)
 create mode 100644 include/pcre2.h
 create mode 100644 lib/i386/libpcre2-8.a
 create mode 100644 lib/x64/libpcre2-8.a

In the Git Extensions GUI, I went back to my own local "GitHub/base"
then I

1. touched readme file (I did not have to do this)
2. staged the changed pcre files (and the readme)
3. git commit
4. git push

O.K.

I am not sure exactly what the shortest method would have been. Most likely someone has an easier method (and more correct method) taking fewer steps. (I would like to read about that solution.)

I am now past the pcre compile step, in the AppVeyor build job. This issue is now closed.

@AndreMikulec
Copy link
Author

Note, for anyone who lands here. I also accidentally acquired a younger version of libcurl. That younger version caused my build to fail. Next, I had to revert that submodule version back: within the submodule folder libcurl, I did a hard rebase, followed by (within the base folder) stage, commit, and push.

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

No branches or pull requests

1 participant