Skip to content

Conversation

yihong0618
Copy link
Contributor

@yihong0618 yihong0618 commented May 12, 2023

This PR fix build on x86_64 fix #1707

@yihong0618 yihong0618 force-pushed the fix_x86_build branch 2 times, most recently from ae8b768 to c183754 Compare May 12, 2023 11:39
Copy link
Owner

@namhyung namhyung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rebase your changes on to the current master (after running git pull). And the commit message should have a proper prefix. 'fix' is not a proper one. It can be 'build' or 'arch/x86' or 'dynamic'. In addition, please consider adding the actual compiler error message to see what's going on here since it might depend on the compiler and its version. It's a convention to indent by two spaces those messages.

@@ -476,7 +476,7 @@ static int check_instrumentable(struct mcount_disasm_engine *disasm, cs_insn *in
case CS_GRP_PRIVILEGE:
case CS_GRP_BRANCH_RELATIVE:
return INSTRUMENT_FAIL_NO_DETAIL;
default:
default:;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't mix two changes in a commit. This change should be separate from the Github workflow. Also you'd better have break statement in the following line.

arch:
- x86_64
- aarch64
- arm64
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aren't aarch64 and arm64 the same?

@yihong0618
Copy link
Contributor Author

copy that will fix it tonight thanks

@yihong0618 yihong0618 force-pushed the fix_x86_build branch 4 times, most recently from 5be10a1 to baddcf4 Compare May 14, 2023 13:05
matrix:
arch:
- x86_64
- aarch64
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I'm not sure if it's really needed to run the unittest on multiple archs.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could please check the actual result? It seems it didn't run the test on an ARM (64-bit) machine.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will check it today, sorry for the inconvenience

@@ -477,6 +477,7 @@ static int check_instrumentable(struct mcount_disasm_engine *disasm, cs_insn *in
case CS_GRP_BRANCH_RELATIVE:
return INSTRUMENT_FAIL_NO_DETAIL;
default:
break;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move it after the comment.

@yihong0618
Copy link
Contributor Author

@namhyung you are right, the arch did not work...
I think it needs a lot of work to test on different arch, so I want to change back and do not change the actions things on different arch, do you agree?

maybe need this:
https://github.com/marketplace/actions/run-on-architecture

@namhyung
Copy link
Owner

I'm ok to drop the github actions and just to fix the build problem.

@yihong0618
Copy link
Contributor Author

Done

@namhyung
Copy link
Owner

For this kind of change, it'd be nice if you could add the actual compiler warning message to the commit like in dae3c72. Note that you may want to indent them by 2 spaces to prevent accidental commenting out if it starts with the hash (#). Anyway I prefer having them indented (even without the hash) to indicate they are copied from elsewhere.

@yihong0618
Copy link
Contributor Author

of course, I will learn your commit and revise mine, thanks for the advice again~

  $ make
    CC FPIC  arch/x86_64/mcount-insn.o
    uftrace/arch/x86_64/mcount-insn.c:479:3: error: label at \
    end of compound statement
    default:
    ^~~~~~~

Fixed: namhyung#1707
Signed-off-by: Yi Hong <zouzou0208@gmail.com>
Copy link
Owner

@namhyung namhyung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for your endurance.

@namhyung namhyung merged commit 34eb3ec into namhyung:master May 17, 2023
@honggyukim
Copy link
Collaborator

Hi @yihong0618, it was my mistake. Thanks for the fix!

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

Successfully merging this pull request may close these issues.

[bug] build failed on x86-64
3 participants