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

[CI] Use GCC 11 instead of clang for macosx build #30

Closed
iamazeem opened this issue Jun 15, 2022 · 12 comments · Fixed by #31
Closed

[CI] Use GCC 11 instead of clang for macosx build #30

iamazeem opened this issue Jun 15, 2022 · 12 comments · Fixed by #31
Assignees
Labels
enhancement New feature or request

Comments

@iamazeem
Copy link
Collaborator

Use GCC 11 instead of clang for macosx build.

@iamazeem iamazeem added the enhancement New feature or request label Jun 15, 2022
@iamazeem iamazeem self-assigned this Jun 15, 2022
@iamazeem
Copy link
Collaborator Author

@liquidaty: macosx/gcc11 build is failing with these errors:

gcc-11 -I/Users/runner/work/zsv/zsv/jq/build/include -pipe -ffunction-sections -fdata-sections -fpic -std=gnu11 -O3 -DNDEBUG -Wno-gnu-statement-expression -Wshadow -Wall -Wextra -Wno-missing-braces -pedantic -DSTDC_HEADERS -D_GNU_SOURCE -ftree-vectorize -fvisibility=hidden -I/Users/runner/work/zsv/zsv/amd64-macosx-gcc/include -mavx2 -DZSV_EXTRAS -DUSE_JQ -DHAVE__MM256_MOVEMASK_EPI8 -DHAVE_IMMINTRIN_H -DHAVE_MEMMEM -DHAVE_ARC4RANDOM_UNIFORM -DHAVE___BUILTIN_EXPECT -DHAVE___BUILTIN_EXPECT_WITH_PROBABILITY -flto -Iexternal/utf8proc-2.6.1 -DUTF8PROC -DUTF8PROC_STATIC -DVERSION=\"b14db94\" -DZSV_CLI -DMAIN=main_pretty -Iexternal/inih -Iexternal/sglib -I/Users/runner/work/zsv/zsv/include -c pretty.c -o /Users/runner/work/zsv/zsv/build/Darwin/rel/gcc-11/objs/cli_pretty.o 
pretty.c:13:10: fatal error: utf8proc.h: No such file or directory
   13 | #include <utf8proc.h>
      |          ^~~~~~~~~~~~
compilation terminated.
make[1]: *** [/Users/runner/work/zsv/zsv/build/Darwin/rel/gcc-11/objs/cli_pretty.o] Error 1
make: *** [install] Error 2

CI run: https://github.com/liquidaty/zsv/runs/6892124476?check_suite_focus=true#step:10:1107

@iamazeem
Copy link
Collaborator Author

The commands for clang and gcc-11 are also identical (except some paths):

clang  -I/Users/runner/work/zsv/zsv/jq/build/include -pipe -ffunction-sections -fdata-sections -fpic -std=gnu11 -O3 -DNDEBUG -Wno-gnu-statement-expression -Wshadow -Wall -Wextra -Wno-missing-braces -pedantic -DSTDC_HEADERS -D_GNU_SOURCE -ftree-vectorize -fvisibility=hidden -I/Users/runner/work/zsv/zsv/amd64-macosx-clang/include -mavx2 -DZSV_EXTRAS -DUSE_JQ -DHAVE__MM256_MOVEMASK_EPI8 -DHAVE_IMMINTRIN_H -DHAVE_MEMMEM -DHAVE_ARC4RANDOM_UNIFORM -DHAVE___BUILTIN_EXPECT -DNO___BUILTIN_EXPECT_WITH_PROBABILITY   -flto -Iexternal/utf8proc-2.6.1 -DUTF8PROC -DUTF8PROC_STATIC -DVERSION=\"64beac3\" -DZSV_CLI -DMAIN=main_pretty -Iexternal/inih -Iexternal/sglib -I/Users/runner/work/zsv/zsv/include -c pretty.c -o /Users/runner/work/zsv/zsv/build/Darwin/rel/clang/objs/cli_pretty.o
gcc-11 -I/Users/runner/work/zsv/zsv/jq/build/include -pipe -ffunction-sections -fdata-sections -fpic -std=gnu11 -O3 -DNDEBUG -Wno-gnu-statement-expression -Wshadow -Wall -Wextra -Wno-missing-braces -pedantic -DSTDC_HEADERS -D_GNU_SOURCE -ftree-vectorize -fvisibility=hidden -I/Users/runner/work/zsv/zsv/amd64-macosx-gcc/include   -mavx2 -DZSV_EXTRAS -DUSE_JQ -DHAVE__MM256_MOVEMASK_EPI8 -DHAVE_IMMINTRIN_H -DHAVE_MEMMEM -DHAVE_ARC4RANDOM_UNIFORM -DHAVE___BUILTIN_EXPECT -DHAVE___BUILTIN_EXPECT_WITH_PROBABILITY -flto -Iexternal/utf8proc-2.6.1 -DUTF8PROC -DUTF8PROC_STATIC -DVERSION=\"b14db94\" -DZSV_CLI -DMAIN=main_pretty -Iexternal/inih -Iexternal/sglib -I/Users/runner/work/zsv/zsv/include -c pretty.c -o /Users/runner/work/zsv/zsv/build/Darwin/rel/gcc-11/objs/cli_pretty.o

@liquidaty
Copy link
Owner

Not able to reproduce. Can you check whether the external/utf8proc-2.6.1 dir was unpacked? Perhaps somehow the bundled utf8proc.tar.gz was not unpacked (which should have happened from the dependency on utf8proc.c arising from the dependency on utf8proc.o)?

@liquidaty
Copy link
Owner

Note that the flags include -Iexternal/utf8proc-2.6.1 so assuming the current dir is ./app, then the file app/external/utf8proc-2.6.1/utf8proc.h should be found

@iamazeem
Copy link
Collaborator Author

iamazeem commented Jun 15, 2022

I just added some debug logs in the Makefile where the archive extracted.
For gcc, the logs are there but for gcc-11 there are no logs.

Any idea why that might be the case? 🤔

CI run: https://github.com/liquidaty/zsv/runs/6893839706?check_suite_focus=true
Logs added with >> prefix.

@liquidaty
Copy link
Owner

pls try main now. thx!

@iamazeem
Copy link
Collaborator Author

@liquidaty: The build on the main branch is failing:

/home/runner/work/zsv/zsv/build/Linux/rel/gcc/external/utf8proc-2.6.1/utf8proc.o: file not recognized: File format not recognized
collect2: error: ld returned 1 exit status
make[1]: *** [/home/runner/work/zsv/zsv/build/Linux/rel/gcc/bin/zsv_echo] Error 1
Makefile:330: recipe for target '/home/runner/work/zsv/zsv/build/Linux/rel/gcc/bin/zsv_echo' failed
make: *** [test] Error 2
make[1]: Leaving directory '/home/runner/work/zsv/zsv/app'

CI logs: https://github.com/liquidaty/zsv/runs/6894095030?check_suite_focus=true#step:7:530

@iamazeem
Copy link
Collaborator Author

Local build is also failing with above error.

@iamazeem
Copy link
Collaborator Author

iamazeem commented Jun 15, 2022

After reverting the app/Makefile changes, the local build is now successful.

@iamazeem
Copy link
Collaborator Author

Looks like macosx/gcc-11 is now passing but now MinGW local and CI builds are failing:

utils/os.c: In function ‘zsv_replace_file’:
utils/os.c:58:72: error: ‘REPLACEFILE_IGNORE_ACL_ERRORS’ undeclared (first use in this function); did you mean ‘REPLACEFILE_IGNORE_MERGE_ERRORS’?
   58 |   if(ReplaceFileW(wdest, wsrc, NULL, REPLACEFILE_IGNORE_MERGE_ERRORS | REPLACEFILE_IGNORE_ACL_ERRORS, 0, 0)) // success
      |                                                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                        REPLACEFILE_IGNORE_MERGE_ERRORS

CI: https://github.com/liquidaty/zsv/runs/6895160680?check_suite_focus=true#step:9:636

@iamazeem
Copy link
Collaborator Author

Removed REPLACEFILE_IGNORE_ACL_ERRORS and the local build compiled successfully.

@iamazeem
Copy link
Collaborator Author

CI build is also successful.
See: https://github.com/liquidaty/zsv/actions/runs/2500907868

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

Successfully merging a pull request may close this issue.

2 participants