-
Notifications
You must be signed in to change notification settings - Fork 444
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
client: show build not OS platform in messages #2436
Conversation
Compared to #2388:
|
Well that's a nice one.
Is there any way to see why it failed? |
From a visual inspection of your changes, I don't see anything that should affect jcapimin.c. I just now synced with GIT master and built the JPEG library on my Mac. There were no warnings or errors building jcapimin.c for either i386 or x86_64 architecture. |
The client shows what kind of operating system it has detected in startup log message and elsewhere. This is confusing and not helping in troubleshooting when people expect these messages to describe the client itself. Change the messages to use client's build platform instead. Startup log message, output of --version and user agent string should be safe to change without breaking anything. The client still uses OS platform in various places but changing these would break stuff: - Scheduler request XML. Scheduler expects scheduler_request.platform_name to be OS primary platform. - client_state.xml. Client writes OS primary platform and alt platforms separately to client_state.xml. The client reads primary platform only to see if it has changed. The client doesn't read alt platforms but some other program might and depends on the platforms being as they are now. Not changing this means the client won't be able to detect when its own platform has changed. OS platform changes are still detected. - get_state GUI RPC. The client writes primary platform to client_state.platform_name and all platforms, including primary, to client_state.platform. BOINC Manager only reads client_state.platform. As such, client_state.platform_name could be changed to client's build platform but some 3rd party manager might depend on it being OS primary platform. - time_stats_log. The client writes platform info there. Unclear who uses that information. Closes #2386.
I restarted the Travis build and it failed the same way. Originally the code read like this:
The idea I had with the Build log made it look like the error was in the middle of |
jcapimin.c #includes jpeglib.h which #includes jconfig.h which has:
Since the JPEG library libjpeg.a can be used in project applications, we build it as a universal binary containing both i386 and x86_64 architectures. When Travis-CI attempted the i386 build of the JPEG library, most or all of the source files included config.h, invoking the #error directive. Moreover, the Xcode build settings for the "boinc' base target has
Another possibility is to take advantage of the fact that BOINC for Mac can be built only on an x86_64 Mac and can be run only on an x86_64 Mac. So this sort of code would also do what you want here:
Finally, note that CLIENT_STATE::detect_platforms() in client/cs_platforms.cpp currently has this code:
so you should also remove this line: |
Correction: I overlooked the ! in
but my explanation for the Travis-CI error and other comments still hold because of the |
Thanks. I had looked at Xcode project file to see if / how
But that is what
Using
As far as I can tell |
Right, but my point is that config.h is #included in the library source files, which are built with both i386 and x86_64 architectures, so it can't have any statements which assume only one architecture. But I agree that something like this could be used in config.h:
but it is wrong to have this under the My other point is that because |
I just had another idea. If you put this in config.h, it won't cause any errors in build targets that don't use
|
Which of course is exactly what you had already done. Sorry to have added so much "noise" to the discussion of this PR while I processed it in my head. Let me know when you are ready to have this merged, and I will merge it. |
Yeah, when I wrote the first code I was concentrated on the client and forgot
No harm done. I learned a bit more about Mac build setup.
I think it's ready but since this replaces PR #2388 I don't know if those who commented there should approve or disapprove this PR. |
I have no objections to this PR and deferring the wxWidgets message discussion to 7.12. It is late in the 7.10 development cycle, so changes for 7.10 should be small and focused which this PR is. |
I think this has been open long enough for any objections to be voiced. @CharlieFenton - I think you can proceed with the merge since @JuhaSointusalo indicates that it is ready above. Once you merge it can you either cherry-pick it into the 7.10 release branch or cherry-pick it into #2429? |
I have merged this into master and cherry-picked it into the 7.10 release branch. |
The client shows what kind of operating system it has detected in startup log message and elsewhere. This is confusing and not helping in troubleshooting when people expect these messages to describe the client itself.
Change the messages to use client's build platform instead.
Startup log message, output of --version and user agent string should be safe to change without breaking anything. The client still uses OS platform in various places but changing these would break stuff:
Closes #2386.