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

Add Intel CI #9179

Closed
wants to merge 19 commits into from
Closed

Add Intel CI #9179

wants to merge 19 commits into from

Conversation

mathomp4
Copy link
Contributor

@mathomp4 mathomp4 commented Jul 19, 2022

This PR adds Intel oneAPI to the CI for curl. At the moment it doesn't work due to various Intel C issues with curl, but this PR might help figure those out?

@bagder
Copy link
Member

bagder commented Jul 19, 2022

Your edits made the lines too long:

./curl_sasl.c:359:88: warning: Longer than 79 columns (LONGLINE)
    * non-pointer conversion from "int" to "unsigned short" may lose significant bits */
./doh.c:613:89: warning: Longer than 79 columns (LONGLINE)
    *   non-pointer conversion from "int" to "unsigned char" may lose significant bits */

@mathomp4
Copy link
Contributor Author

mathomp4 commented Jul 19, 2022

Your edits made the lines too long:

./curl_sasl.c:359:88: warning: Longer than 79 columns (LONGLINE)
    * non-pointer conversion from "int" to "unsigned short" may lose significant bits */
./doh.c:613:89: warning: Longer than 79 columns (LONGLINE)
    *   non-pointer conversion from "int" to "unsigned char" may lose significant bits */

Oops. I can fix that if you like if you can tell me what's a good comment you'd like. (I guess I'm an "unlimited line length" sort of programmer. 😄 )

Or maybe there's a way to get you write access to my branch on my fork? Either is fine!

@bagder
Copy link
Member

bagder commented Jul 19, 2022

Oops. I can fix that if you like if you can tell me what's a good comment you'd like

We don't have any particular rules for how comments should look like, as long as they don't make the lines longer than 79 columns.

bagder added a commit that referenced this issue Jul 19, 2022
This was an accurate error pointed out by the icc warning: enumerated
type mixed with another type

Ref: #9179
bagder added a commit that referenced this issue Jul 19, 2022
This was an accurate error pointed out by the icc warning: enumerated
type mixed with another type

Ref: #9179
Closes #9184
bagder added a commit that referenced this issue Jul 19, 2022
This was an accurate error pointed out by the icc warning: enumerated
type mixed with another type

Ref: #9179
Closes #9184
@bagder bagder force-pushed the feature/add-intel-to-ci branch from b11cb30 to c49a03b Compare Jul 19, 2022
@bagder
Copy link
Member

bagder commented Jul 19, 2022

I also took the liberty to force-push after I rebased this branch on top of the recent ftp fix for icc.

@bagder
Copy link
Member

bagder commented Jul 19, 2022

Gosh, it really does not like getinfo.c...

getinfo.c(442): error #2259: non-pointer conversion from "unsigned long" to "double" may lose significant bits
        *param_doublep = (double)val;
                         ^
getinfo.c(451): error #2259: non-pointer conversion from "timediff_t={curl_off_t={long}}" to "double" may lose significant bits
      *param_doublep = DOUBLE_SECS(data->progress.timespent);
                       ^
getinfo.c(454): error #2259: non-pointer conversion from "timediff_t={curl_off_t={long}}" to "double" may lose significant bits
      *param_doublep = DOUBLE_SECS(data->progress.t_nslookup);
                       ^
make[2]: Leaving directory '/home/runner/work/curl/curl/lib'
getinfo.c(457): error #2259: non-pointer conversion from "timediff_t={curl_off_t={long}}" to "double" may lose significant bits
      *param_doublep = DOUBLE_SECS(data->progress.t_connect);
make[1]: Leaving directory '/home/runner/work/curl/curl/lib'
                       ^
getinfo.c(460): error #2259: non-pointer conversion from "timediff_t={curl_off_t={long}}" to "double" may lose significant bits
      *param_doublep = DOUBLE_SECS(data->progress.t_appconnect);
                       ^
...

lib/c-hyper.c Outdated Show resolved Hide resolved
@bagder
Copy link
Member

bagder commented Jul 20, 2022

The intel compiler warning 2259 (non-pointer conversion from X to Y may lose significant bits) is simply too much and goes beyond normal C programming, so I decided we ignore it globally, so once it all builds fine I will remove the individual changes done to cater for 2259.

@mathomp4
Copy link
Contributor Author

mathomp4 commented Jul 20, 2022

The intel compiler warning 2259 (non-pointer conversion from X to Y may lose significant bits) is simply too much and goes beyond normal C programming, so I decided we ignore it globally, so once it all builds fine I will remove the individual changes done to cater for 2259.

@bagder Note that the way you are disabling the warnings with -wd and turning warnings into errors with -we seems to be deprecated:

icc: command line remark #10010: option '-we140,147,165,266' is deprecated and will be removed in a future release. See '-help deprecated'
icc: command line remark #10010: option '-wd279,981,1469,2259' is deprecated and will be removed in a future release. See '-help deprecated'

Looking at their docs, it seems like the translation (on Linux/macOS) is:

  • -wd-diag-disable
  • -we-diag-error

@bagder
Copy link
Member

bagder commented Jul 20, 2022

@mathomp4 thanks, I failed to find which updated options to use myself so your help is appreciated. I'll switch to using them too as part of the work in this PR.

mathomp4 and others added 11 commits Jul 22, 2022
-wd and -we are deprecated and are now -diag-disable and -diag-error

Disable warning 1024 and 2259
To fix the icc warning enumerated type mixed with another type
As it caused icc to complain: "pointer cast involving 64-bit pointed-to
type"
As virtually no called checked the return code, and those that did
wrongly treated it as a CURLcode. Detected by the icc compiler warning:
enumerated type mixed with another type
It does not return a CURLcode. Detected by the icc compiler warning
"enumerated type mixed with another type"
To fix icc compiler warning integer conversion resulted in a change of sign
To match set.method used for the same purpose.
To avoid "enumerated type mixed with another type"
@bagder bagder force-pushed the feature/add-intel-to-ci branch from efba3ae to d7e9e92 Compare Jul 22, 2022
@bagder
Copy link
Member

bagder commented Jul 22, 2022

ok, I did the wrong closes PR number, have fixed in my local repo.

@bagder bagder closed this in b35a49a Jul 23, 2022
bagder added a commit that referenced this issue Jul 23, 2022
-wd and -we are deprecated and are now -diag-disable and -diag-error

Disable warning 1024 and 2259

Closes #9179
bagder added a commit that referenced this issue Jul 23, 2022
To fix the icc warning enumerated type mixed with another type

Closes #9179
bagder added a commit that referenced this issue Jul 23, 2022
As it caused icc to complain: "pointer cast involving 64-bit pointed-to
type"

Closes #9179
bagder added a commit that referenced this issue Jul 23, 2022
As virtually no called checked the return code, and those that did
wrongly treated it as a CURLcode. Detected by the icc compiler warning:
enumerated type mixed with another type

Closes #9179
bagder added a commit that referenced this issue Jul 23, 2022
It does not return a CURLcode. Detected by the icc compiler warning
"enumerated type mixed with another type"

Closes #9179
bagder added a commit that referenced this issue Jul 23, 2022
To fix icc compiler warning integer conversion resulted in a change of sign

Closes #9179
bagder added a commit that referenced this issue Jul 23, 2022
To match set.method used for the same purpose.

Closes #9179
bagder added a commit that referenced this issue Jul 23, 2022
 error #188: enumerated type mixed with another type

Closes #9179
bagder added a commit that referenced this issue Jul 23, 2022
To avoid "enumerated type mixed with another type"

Closes #9179
bagder added a commit that referenced this issue Jul 23, 2022
bagder added a commit that referenced this issue Jul 23, 2022
bagder added a commit that referenced this issue Jul 23, 2022
bagder added a commit that referenced this issue Jul 23, 2022
"enumerated type mixed with another type"

Closes #9179
bagder added a commit that referenced this issue Jul 23, 2022
The specific reason was not used.

Closes #9179
bagder added a commit that referenced this issue Jul 23, 2022
bagder added a commit that referenced this issue Jul 23, 2022
@bagder
Copy link
Member

bagder commented Jul 23, 2022

Thanks @mathomp4 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants