chmorgan / esphttpd-freertos

freertos example of libesphttpd for esp32 and esp8266
54 stars 13 forks source link

git clone fails for project #16

Closed iveyj1 closed 5 years ago

iveyj1 commented 5 years ago

Trying to run git clone, I get the following; any suggestions? Similar error on Linux. Thanks.

"C:\Program Files (x86)\Git\bin\git.exe" clone -v --recurse-submodules --progress "https://github.com/chmorgan/esphttpd-freertos.git" "c:/dev/esphttpd-freertos" Cloning into 'c:/dev/esphttpd-freertos'... POST git-upload-pack (175 bytes) remote: Enumerating objects: 25, done. remote: Counting objects: 100% (25/25), done. remote: Compressing objects: 100% (23/23), done. remote: Total 227 (delta 7), reused 14 (delta 2), pack-reused 202Receiving ob Receiving objects: 100% (227/227), 189.25 KiB | 1.32 MiB/s, done. Resolving deltas: 100% (101/101), done. Submodule 'components/espfs' (https://github.com/jkent/esp32-espfs.git) registered for path 'components/espfs' Submodule 'components/libesphttpd' (https://github.com/chmorgan/libesphttpd.git) registered for path 'components/libesphttpd' Cloning into 'C:/dev/esphttpd-freertos/components/espfs'... remote: Enumerating objects: 50, done. remote: Counting objects: 100% (50/50), done. remote: Compressing objects: 100% (38/38), done. remote: Total 50 (delta 17), reused 43 (delta 11), pack-reused 0 Cloning into 'C:/dev/esphttpd-freertos/components/libesphttpd'... remote: Enumerating objects: 15, done. remote: Counting objects: 100% (15/15), done. remote: Compressing objects: 100% (10/10), done. remote: Total 2749 (delta 5), reused 11 (delta 5), pack-reused 2734 Receiving objects: 100% (2749/2749), 1011.39 KiB | 595.00 KiB/s, done. Resolving deltas: 100% (1861/1861), done. Submodule path 'components/espfs': checked out 'b87f89adcda2d15c60f078b9dcc20dea3fcbd116' Submodule 'heatshrink' (https://github.com/atomicobject/heatshrink.git) registered for path 'components/espfs/heatshrink' Cloning into 'C:/dev/esphttpd-freertos/components/espfs/heatshrink'... remote: Enumerating objects: 442, done. remote: Total 442 (delta 0), reused 0 (delta 0), pack-reused 442 Receiving objects: 100% (442/442), 177.36 KiB | 532.00 KiB/s, done. Resolving deltas: 100% (264/264), done. Submodule path 'components/espfs/heatshrink': checked out 'ffd95059ff9155fa373b3e6276854db3ad7b4e3c' error: Server does not allow request for unadvertised object 587d987efa5ab2473cf1e61c0e6f7a93cfce1f67 Fetched in submodule path 'components/libesphttpd', but it did not contain 587d987efa5ab2473cf1e61c0e6f7a93cfce1f67. Direct fetching of that commit failed. Done

phatpaul commented 5 years ago

I have seen that error before. Ill try to fix it tomorrow.

but for now, try this: Looks like it is failing to clone the submodules. I cant tell if it is components/espfs or components/libesphttpd

CD into the git submodule directories and switch to master branch. Then git pull from within the submodule.

On Mon, May 27, 2019, 8:57 PM Jack Ivey notifications@github.com wrote:

Trying to run git clone, I get the following; any suggestions? Similar error on Linux. Thanks.

"C:\Program Files (x86)\Git\bin\git.exe" clone -v --recurse-submodules --progress "https://github.com/chmorgan/esphttpd-freertos.git" "c:/dev/esphttpd-freertos" Cloning into 'c:/dev/esphttpd-freertos'... POST git-upload-pack (175 bytes) remote: Enumerating objects: 25, done. remote: Counting objects: 100% (25/25), done. remote: Compressing objects: 100% (23/23), done. remote: Total 227 (delta 7), reused 14 (delta 2), pack-reused 202Receiving ob Receiving objects: 100% (227/227), 189.25 KiB | 1.32 MiB/s, done. Resolving deltas: 100% (101/101), done. Submodule 'components/espfs' (https://github.com/jkent/esp32-espfs.git) registered for path 'components/espfs' Submodule 'components/libesphttpd' ( https://github.com/chmorgan/libesphttpd.git) registered for path 'components/libesphttpd' Cloning into 'C:/dev/esphttpd-freertos/components/espfs'... remote: Enumerating objects: 50, done. remote: Counting objects: 100% (50/50), done. remote: Compressing objects: 100% (38/38), done. remote: Total 50 (delta 17), reused 43 (delta 11), pack-reused 0 Cloning into 'C:/dev/esphttpd-freertos/components/libesphttpd'... remote: Enumerating objects: 15, done. remote: Counting objects: 100% (15/15), done. remote: Compressing objects: 100% (10/10), done. remote: Total 2749 (delta 5), reused 11 (delta 5), pack-reused 2734 Receiving objects: 100% (2749/2749), 1011.39 KiB | 595.00 KiB/s, done. Resolving deltas: 100% (1861/1861), done. Submodule path 'components/espfs': checked out 'b87f89adcda2d15c60f078b9dcc20dea3fcbd116' Submodule 'heatshrink' (https://github.com/atomicobject/heatshrink.git) registered for path 'components/espfs/heatshrink' Cloning into 'C:/dev/esphttpd-freertos/components/espfs/heatshrink'... remote: Enumerating objects: 442, done. remote: Total 442 (delta 0), reused 0 (delta 0), pack-reused 442 Receiving objects: 100% (442/442), 177.36 KiB | 532.00 KiB/s, done. Resolving deltas: 100% (264/264), done. Submodule path 'components/espfs/heatshrink': checked out 'ffd95059ff9155fa373b3e6276854db3ad7b4e3c' error: Server does not allow request for unadvertised object 587d987efa5ab2473cf1e61c0e6f7a93cfce1f67 Fetched in submodule path 'components/libesphttpd', but it did not contain 587d987efa5ab2473cf1e61c0e6f7a93cfce1f67. Direct fetching of that commit failed. Done

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/chmorgan/esphttpd-freertos/issues/16?email_source=notifications&email_token=AA2VK52CT4QPUMA35PWFDU3PXR7OPA5CNFSM4HP66RE2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GWDQ3JA, or mute the thread https://github.com/notifications/unsubscribe-auth/AA2VK53MH7RI7HMA33VEVZLPXR7OPANCNFSM4HP66REQ .

iveyj1 commented 5 years ago

I tried it and something's still not right.

Git thinks libesphttpd and espfs are up to date. It thinks esphttpd-freertos is up to date, but with file mods (I haven't changed anything). I also ran submodule update at the top level which did something with heatshrink, but didn't help. Transcript below.

When I build, the compiler can't find heatshrink_decoder.h although that file does exist in the heatshrink directory.

Thanks for the help!

user1@NUCi7Linux ~/esp/esphttpd-freertos $ git pull Already up-to-date.

user1@NUCi7Linux ~/esp/esphttpd-freertos $ git submodule update --recursive --remote Submodule path 'components/espfs/heatshrink': checked out '7d419e1fa4830d0b919b9b6a91fe2fb786cf3280'

user1@NUCi7Linux ~/esp/esphttpd-freertos $ git status On branch master Your branch is up-to-date with 'origin/master'. Changes not staged for commit: (use "git add ..." to update what will be committed) (use "git checkout -- ..." to discard changes in working directory) (commit or discard the untracked or modified content in submodules)

modified:   components/espfs (new commits, modified content)
modified:   components/libesphttpd (new commits)

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

user1@NUCi7Linux ~/esp/esphttpd-freertos $ git pull Already up-to-date.

...

user1@NUCi7Linux ~/esp/esphttpd-freertos/components/espfs $ git pull Already up-to-date. user1@NUCi7Linux ~/esp/esphttpd-freertos/components/espfs $ git status On branch master Your branch is up-to-date with 'origin/master'. Changes not staged for commit: (use "git add ..." to update what will be committed) (use "git checkout -- ..." to discard changes in working directory)

modified:   heatshrink (new commits)

no changes added to commit (use "git add" and/or "git commit -a") ... user1@NUCi7Linux ~/esp/esphttpd-freertos/components/libesphttpd $ git status On branch master Your branch is up-to-date with 'origin/master'. nothing to commit, working directory clean

...

user1@NUCi7Linux ~/esp/esphttpd-freertos/components/espfs/heatshrink $ git status HEAD detached at 7d419e1 nothing to commit, working directory clean

...

user1@NUCi7Linux ~/esp/esphttpd-freertos $ make flash Toolchain path: /home/user1/esp/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc Toolchain version: crosstool-ng-1.22.0-80-g6c4433a Compiler version: 5.2.0 Python requirements from /home/user1/esp/esp-idf/requirements.txt are satisfied.

App "user" version: 174ee09-dirty CC build/espfs/src/espfs.o /home/user1/esp/esphttpd-freertos/components/espfs/src/espfs.c:25:32: fatal error: heatshrink_decoder.h: No such file or directory compilation terminated. /home/user1/esp/esp-idf/make/component_wrapper.mk:289: recipe for target 'src/espfs.o' failed make[1]: [src/espfs.o] Error 1 /home/user1/esp/esp-idf/make/project.mk:582: recipe for target 'component-espfs-build' failed make: [component-espfs-build] Error 2

user1@NUCi7Linux ~/esp/tmp/esphttpd-freertos $ ll components/espfs/heatshrink/include/ total 36 -rw-rw-r-- 1 user1 user1 501 May 27 22:43 heatshrink_common.h -rw-rw-r-- 1 user1 user1 3849 May 27 22:43 heatshrink_decoder.h -rw-rw-r-- 1 user1 user1 3615 May 27 22:43 heatshrink_encoder.h

iveyj1 commented 5 years ago

BTW, it's not an emergency, I can wait for a definitive fix, but I included above in case it's helpful.

phatpaul commented 5 years ago

Sorry, you must be the first one to try this repo since I restructured it.
It seems the submodule link to chmorgan/libesphttpd was pointing to somewhere that is not in the git history. I'll go ahead and update the link to the latest master.

So now your easiest option is to just delete your copy of this repo and clone it again (recursive).

Otherwise:

Do this to fix the unadvertised object error: (tip from https://github.com/zyra/ionic-super-tabs/issues/170#issuecomment-334929493)

git submodule init
git submodule sync
git submodule foreach "(git checkout master; git pull)"

I think the error regarding missing heatshrink_decoder.h is due to you having some left-over files in your working-copy that have been (re)moved in a later commit. Do a git clean to remove those files.

FYI use make -j8 flash to build using 8 threads on your i7 (unless you're getting paid by the hour ;)

iveyj1 commented 5 years ago

Works great now, thanks for the help! Also faster with -j8.