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

differentiate gcc-powerpc-linux-gnu package name on different architecture #3434

Merged
merged 3 commits into from
May 30, 2022
Merged

Conversation

JerryKwan
Copy link
Collaborator

@JerryKwan JerryKwan commented May 30, 2022

differentiate gcc-powerpc-linux-gnu package name on different
architecture

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Other information

differentiate gcc-powerpc-linux-gnu package name on different
architecture
@JerryKwan
Copy link
Collaborator Author

JerryKwan commented May 30, 2022

Bug fix for issue #3433 and #3435

add option -std-gnu99 when building cryptonight
@jolestar jolestar requested a review from nkysg May 30, 2022 05:51
@codecov
Copy link

codecov bot commented May 30, 2022

Codecov Report

Merging #3434 (b23fc19) into master (b72a546) will decrease coverage by 0.06%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3434      +/-   ##
==========================================
- Coverage   32.28%   32.22%   -0.05%     
==========================================
  Files         500      500              
  Lines       46805    46805              
  Branches    21301    21301              
==========================================
- Hits        15104    15080      -24     
- Misses      17578    17680     +102     
+ Partials    14123    14045      -78     
Flag Coverage Δ
unittests 32.22% <0.00%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
consensus/cryptonight-rs/build.rs 18.19% <0.00%> (ø)
test-helper/src/dummy_network_service.rs 22.23% <0.00%> (-14.81%) ⬇️
vm/types/src/language_storage_ext.rs 37.50% <0.00%> (-12.50%) ⬇️
vm/types/src/on_chain_config/vm_config.rs 35.00% <0.00%> (-11.66%) ⬇️
executor/src/block_executor.rs 33.34% <0.00%> (-8.88%) ⬇️
...ccount_config/resources/module_upgrade_strategy.rs 34.29% <0.00%> (-8.57%) ⬇️
abi/decoder/src/lib.rs 1.58% <0.00%> (-7.87%) ⬇️
rpc/api/src/contract_api.rs 11.77% <0.00%> (-5.88%) ⬇️
vm/resource-viewer/src/lib.rs 0.66% <0.00%> (-5.26%) ⬇️
storage/src/transaction_info/mod.rs 50.00% <0.00%> (-4.34%) ⬇️
... and 66 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b72a546...b23fc19. Read the comment docs.

@nkysg
Copy link
Collaborator

nkysg commented May 30, 2022

@JerryKwan Hi, there is a script https://github.com/starcoinorg/starcoin/blob/master/scripts/check_commit.sh, you can run it and find some format mistakes. Please check it , thks.

change code style according to the suggestions of scripts/check_commit.sh
@nkysg
Copy link
Collaborator

nkysg commented May 30, 2022

@JerryKwan Hi, I hava a question to ask you。#3435 remind , is -std=c99 can work? In my computer, I compile use cargo build --release, then i use these command

cd target
find . -name output | grep cryptonight
./release/build/cryptonight-rs-452255b71a5e3640/output
./release/build/cryptonight-rs-452255b71a5e3640.bak/output

use -std=gnu99 in the output file, it shows the C compiler command

TARGET = Some("x86_64-apple-darwin")
DEBUG = Some("false")
running: "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-arch" "x86_64" "-I" "ext/" "-Wall" "-Wextra" "-maes" "-msse2" "-Ofast" "-fexceptions" "-std=gnu99" "-o" "/Users/YSG/Github/starcoin/target/release/build/cryptonight-rs-452255b71a5e3640/out/ext/c_groestl.o" "-c" "ext/c_groestl.c"

use -std=c99 in the output file, it shows the C compiler command

DEBUG = Some("false")
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2,sse3,ssse3")
running: "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-arch" "x86_64" "-I" "ext/" "-Wall" "-Wextra" "-maes" "-msse2" "-Ofast" "-fexceptions" "-std=c99" "-o" "/Users/YSG/Github/starcoin/target/release/build/cryptonight-rs-452255b71a5e3640/out/ext/c_groestl.o" "-c" "ext/c_groestl.c"

I think it can work, but i don't have centos7.9. can you help me to try?

@JerryKwan
Copy link
Collaborator Author

scripts/check_commit.sh

@nkysg change the code style accordingly

@JerryKwan
Copy link
Collaborator Author

@nkysg
Have done some test using -std=c99, the following error prompts

  error occurred: Command "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-I" "ext/" "-Wall" "-Wextra" "-maes" "-msse2" "-Ofast" "-fexceptions" "-std=c99" "-o" "/home/workspace/starcoin/target/debug/build/cryptonight-rs-c522f4affd0f040f/out/ext/aesb.o" "-c" "ext/aesb.c" with args "cc" did not execute successfully (status code exit status: 1).

It might be caused by the cc version.
The version I am using is cc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44), which version are you using?

@nkysg
Copy link
Collaborator

nkysg commented May 30, 2022

May be some mistake in centos7.9, we could use -std=gnu99 let it run.

@nkysg nkysg merged commit 1133a34 into starcoinorg:master May 30, 2022
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.

2 participants