Closed evanmayer closed 1 year ago
Instructions for setting up GitHub actions for a repo that needs to check out a private submodule:
Closes #67
@shubhagrawal30 it looks like you are a reviewer but I think your findings have been resolved. Can you approve or let me know if you need more time?
This PR helps with compiling the flight software in situations where the Internet is not available. It does this by converting dependencies that are currently downloaded by CMake
ExternalProject_Add
at build time into git submodules, which are downloaded atgit clone
time, assuming the option--recurse-submodules
is supplied.This PR requires users perform some steps to update their checkouts of the repo. From root,
git submodule init
git submodule update
should cover it. If not, blowing away the repo and
git clone --recurse-submodules <repo ssh or URL>
is another option.Thanks @shubhagrawal30 for bringing up this issue again.
Output with network adapter on VM host computer turned off
```bash vagrant@fc1:/media/sf_TIMflight/mcp$ mkdir build vagrant@fc1:/media/sf_TIMflight/mcp$ cd build vagrant@fc1:/media/sf_TIMflight/mcp/build$ cmake .. -- The C compiler identification is GNU 9.4.0 -- The CXX compiler identification is GNU 9.4.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE -- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.1f") -- Checking for module 'glib-2.0' -- Found glib-2.0, version 2.64.6 -- Could NOT find cmocka (missing: cmocka_DIR) -- Could NOT find cmocka (missing: cmocka_DIR) -- Could NOT find cmocka (missing: cmocka_DIR) -- Could NOT find cmocka (missing: cmocka_DIR) -- Configuring done -- Generating done -- Build files have been written to: /media/sf_TIMflight/mcp/build vagrant@fc1:/media/sf_TIMflight/mcp/build$ cmake --build . Scanning dependencies of target phenomproj [ 1%] Creating directories for 'phenomproj' [ 2%] Performing download step (git clone) for 'phenomproj' Cloning into 'phenomproj'... done. Already on 'master' Your branch is up to date with 'origin/master'. [ 3%] Performing patch step for 'phenomproj' libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, '.acaux'. libtoolize: linking file '.acaux/config.guess' libtoolize: linking file '.acaux/config.sub' libtoolize: linking file '.acaux/install-sh' libtoolize: linking file '.acaux/ltmain.sh' libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.ac, libtoolize: and rerunning libtoolize and aclocal. libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am. configure.ac:31: installing '.acaux/compile' configure.ac:30: installing '.acaux/missing' Makefile.am: installing '.acaux/depcomp' parallel-tests: installing '.acaux/test-driver' [ 3%] Performing update step for 'phenomproj' Already up to date. [ 4%] Performing configure step for 'phenomproj' [ 5%] Performing build step for 'phenomproj' make[3]: Warning: File 'thirdparty/tap/.deps/libtap_a-tap.Po' has modification time 0.65 s in the future CC corelib/libphenom_la-init.lo CC corelib/libphenom_la-buf.lo CC corelib/libphenom_la-config.lo CC corelib/libphenom_la-counter.lo CC corelib/libphenom_la-debug_console.lo CC corelib/dns/libphenom_la-addrinfo.lo CC corelib/libphenom_la-dtoa.lo corelib/dtoa.c: In function ‘ph_strtod’: corelib/dtoa.c:2542:12: warning: this statement may fall through [-Wimplicit-fallthrough=] 2542 | sign = 1; | ~~~~~^~~ corelib/dtoa.c:2544:5: note: here 2544 | case '+': | ^~~~ corelib/dtoa.c:2654:15: warning: this statement may fall through [-Wimplicit-fallthrough=] 2654 | esign = 1; | ~~~~~~^~~ corelib/dtoa.c:2655:7: note: here 2655 | case '+': | ^~~~ corelib/dtoa.c: In function ‘gethex’: corelib/dtoa.c:1876:13: warning: this statement may fall through [-Wimplicit-fallthrough=] 1876 | esign = 1; | ~~~~~~^~~ corelib/dtoa.c:1878:7: note: here 1878 | case '+': | ^~~~ corelib/dtoa.c: In function ‘ph_dtoa’: corelib/dtoa.c:3910:17: warning: this statement may fall through [-Wimplicit-fallthrough=] 3910 | leftright = 0; | ~~~~~~~~~~^~~ corelib/dtoa.c:3912:5: note: here 3912 | case 4: | ^~~~ corelib/dtoa.c:3918:17: warning: this statement may fall through [-Wimplicit-fallthrough=] 3918 | leftright = 0; | ~~~~~~~~~~^~~ corelib/dtoa.c:3920:5: note: here 3920 | case 5: | ^~~~ CC corelib/libphenom_la-error.lo CC corelib/libphenom_la-hook.lo CC corelib/libphenom_la-log.lo CC corelib/libphenom_la-memory.lo CC corelib/openssl/libphenom_la-bio_stream.lo CC corelib/openssl/libphenom_la-bio_bufq.lo CC corelib/openssl/libphenom_la-init.lo CC corelib/openssl/libphenom_la-ssl_stream.lo CC corelib/libphenom_la-pingfd.lo CC corelib/libphenom_la-pipe2.lo CC corelib/libphenom_la-pprintf.lo CC corelib/nbio/libphenom_la-common.lo CC corelib/nbio/libphenom_la-epoll.lo CC corelib/nbio/libphenom_la-kqueue.lo CC corelib/nbio/libphenom_la-portfs.lo CC corelib/libphenom_la-job.lo CC corelib/libphenom_la-string.lo CC corelib/libphenom_la-serial.lo In file included from /usr/include/string.h:495, from include/phenom/defs.h:104, from include/phenom/serial.h:21, from corelib/serial.c:17: In function ‘strncpy’, inlined from ‘ph_serial_open’ at corelib/serial.c:299:3: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ specified bound 4096 equals destination size [-Wstringop-truncation] 106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ CC corelib/net/libphenom_la-listener.lo CC corelib/net/libphenom_la-sockaddr.lo CC corelib/net/libphenom_la-socket.lo CC corelib/libphenom_la-thread.lo CC corelib/libphenom_la-timerwheel.lo CC corelib/libphenom_la-vprintf.lo CC corelib/variant/libphenom_la-variant.lo CC corelib/variant/libphenom_la-json-dump.lo CC corelib/variant/libphenom_la-json-load.lo CC corelib/variant/libphenom_la-pack.lo CC corelib/variant/libphenom_la-path.lo CC corelib/hash/libphenom_la-murmur.lo corelib/hash/murmur.c: In function ‘ph_hash_bytes_murmur’: corelib/hash/murmur.c:65:17: warning: this statement may fall through [-Wimplicit-fallthrough=] 65 | case 15: k2 ^= (uint64_t)(tail[14]) << 48; | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ corelib/hash/murmur.c:66:5: note: here 66 | case 14: k2 ^= (uint64_t)(tail[13]) << 40; | ^~~~ corelib/hash/murmur.c:66:17: warning: this statement may fall through [-Wimplicit-fallthrough=] 66 | case 14: k2 ^= (uint64_t)(tail[13]) << 40; | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ corelib/hash/murmur.c:67:5: note: here 67 | case 13: k2 ^= (uint64_t)(tail[12]) << 32; | ^~~~ corelib/hash/murmur.c:67:17: warning: this statement may fall through [-Wimplicit-fallthrough=] 67 | case 13: k2 ^= (uint64_t)(tail[12]) << 32; | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ corelib/hash/murmur.c:68:5: note: here 68 | case 12: k2 ^= (uint64_t)(tail[11]) << 24; | ^~~~ corelib/hash/murmur.c:68:17: warning: this statement may fall through [-Wimplicit-fallthrough=] 68 | case 12: k2 ^= (uint64_t)(tail[11]) << 24; | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ corelib/hash/murmur.c:69:5: note: here 69 | case 11: k2 ^= (uint64_t)(tail[10]) << 16; | ^~~~ corelib/hash/murmur.c:69:17: warning: this statement may fall through [-Wimplicit-fallthrough=] 69 | case 11: k2 ^= (uint64_t)(tail[10]) << 16; | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ corelib/hash/murmur.c:70:5: note: here 70 | case 10: k2 ^= (uint64_t)(tail[ 9]) << 8; | ^~~~ corelib/hash/murmur.c:70:17: warning: this statement may fall through [-Wimplicit-fallthrough=] 70 | case 10: k2 ^= (uint64_t)(tail[ 9]) << 8; | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ corelib/hash/murmur.c:71:5: note: here 71 | case 9: k2 ^= (uint64_t)(tail[ 8]) << 0; | ^~~~ corelib/hash/murmur.c:72:59: warning: this statement may fall through [-Wimplicit-fallthrough=] 72 | k2 *= c2; k2 = rotl64(k2, 33); k2 *= c1; h2 ^= k2; | ~~~^~~~~ corelib/hash/murmur.c:74:5: note: here 74 | case 8: k1 ^= (uint64_t)(tail[ 7]) << 56; | ^~~~ corelib/hash/murmur.c:74:17: warning: this statement may fall through [-Wimplicit-fallthrough=] 74 | case 8: k1 ^= (uint64_t)(tail[ 7]) << 56; | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ corelib/hash/murmur.c:75:5: note: here 75 | case 7: k1 ^= (uint64_t)(tail[ 6]) << 48; | ^~~~ corelib/hash/murmur.c:75:17: warning: this statement may fall through [-Wimplicit-fallthrough=] 75 | case 7: k1 ^= (uint64_t)(tail[ 6]) << 48; | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ corelib/hash/murmur.c:76:5: note: here 76 | case 6: k1 ^= (uint64_t)(tail[ 5]) << 40; | ^~~~ corelib/hash/murmur.c:76:17: warning: this statement may fall through [-Wimplicit-fallthrough=] 76 | case 6: k1 ^= (uint64_t)(tail[ 5]) << 40; | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ corelib/hash/murmur.c:77:5: note: here 77 | case 5: k1 ^= (uint64_t)(tail[ 4]) << 32; | ^~~~ corelib/hash/murmur.c:77:17: warning: this statement may fall through [-Wimplicit-fallthrough=] 77 | case 5: k1 ^= (uint64_t)(tail[ 4]) << 32; | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ corelib/hash/murmur.c:78:5: note: here 78 | case 4: k1 ^= (uint64_t)(tail[ 3]) << 24; | ^~~~ corelib/hash/murmur.c:78:17: warning: this statement may fall through [-Wimplicit-fallthrough=] 78 | case 4: k1 ^= (uint64_t)(tail[ 3]) << 24; | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ corelib/hash/murmur.c:79:5: note: here 79 | case 3: k1 ^= (uint64_t)(tail[ 2]) << 16; | ^~~~ corelib/hash/murmur.c:79:17: warning: this statement may fall through [-Wimplicit-fallthrough=] 79 | case 3: k1 ^= (uint64_t)(tail[ 2]) << 16; | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ corelib/hash/murmur.c:80:5: note: here 80 | case 2: k1 ^= (uint64_t)(tail[ 1]) << 8; | ^~~~ corelib/hash/murmur.c:80:17: warning: this statement may fall through [-Wimplicit-fallthrough=] 80 | case 2: k1 ^= (uint64_t)(tail[ 1]) << 8; | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ corelib/hash/murmur.c:81:5: note: here 81 | case 1: k1 ^= (uint64_t)(tail[ 0]) << 0; | ^~~~ CC corelib/hash/libphenom_la-table.lo CC corelib/streams/libphenom_la-copy.lo CC corelib/streams/libphenom_la-make.lo CC corelib/streams/libphenom_la-read.lo CC corelib/streams/libphenom_la-write.lo CC corelib/streams/libphenom_la-fd.lo CC corelib/streams/libphenom_la-string.lo CC corelib/streams/libphenom_la-temp.lo CCLD libphenom.la copying selected object files to avoid basename conflicts... ln: failed to create hard link '.libs/libphenom.lax/lt1-libphenom_la-init.o' => 'corelib/openssl/libphenom_la-init.o': Operation not permitted ln: failed to create hard link '.libs/libphenom.lax/lt2-libphenom_la-string.o' => 'corelib/streams/libphenom_la-string.o': Operation not permitted make[3]: warning: Clock skew detected. Your build may be incomplete. [ 6%] No install step for 'phenomproj' [ 6%] Completed 'phenomproj' [ 6%] Built target phenomproj Scanning dependencies of target soem [...] [ 85%] Built target mcp Scanning dependencies of target libcmocka [ 85%] Creating directories for 'libcmocka' [ 86%] Performing download step (git clone) for 'libcmocka' Cloning into 'libcmocka'... done. Note: switching to 'cmocka-1.1.5'. You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by switching back to a branch. If you want to create a new branch to retain commits you create, you may do so (now or later) by using -c with the switch command. Example: git switch -c