-
Notifications
You must be signed in to change notification settings - Fork 50
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
Bug: build is broken on PowerPC: make: [charbit.h] Error 127 (ignored) #83
Comments
Hello @barracuda156, We have no PowerPC hardware, so we will need your help in diagnosing this issue. Please upload the output of make debug as in:
PLEASE attach the debug.out file to your GitHub issue. |
@lcn2 Your suggestion was very helpful: I did not otherwise notice that Makefile has Once that is fixed, the build completes successfully (with multiple warnings like Could we get rid or hardcoding a specific compiler for Darwin or otherwise at least avoid Clang on PowerPC? |
What is the latest C standard supported by the PowerPC gcc compiler? Does forcing
Not sure what the impact on later Darwin systems might be to remove the clang reference in the Darwin section. @barracuda156, by running: make debug A detailed file called |
The latest compiler that was part of Xcode on Mac OS X 10.5, the last version compatible with PowerPCs, was gcc 4.2.1. That gcc version was released in 2007 so it predates c11 support by a few years.
None; just use |
The top of the master branch defaults "LCC=cc" for Darwin as well as the new calc v2.14.2.2 release. We recommend that you fetch the top of of the master branch or the tarball from the new calc v2.14.2.2 release. |
Once you fetched the top of the master branch or fetched the source from the new calc v2.14.2.2, @barracuda156 : Once you have done this, @barracuda156, please run: make debug and then attach the This will help us fix the PowerPC warnings about "long long" and c90. If we can detect the PowerPC architecture under Darwin in the Makefile, we can add add "-std=gnu99" to CFLAGS so that the PowerPC will compile under "gnu99". Moreover the use of "long long" on a PowerPC may improve the performance of calc. |
@lcn2 Will do in an hour or so. P. S. There should not be a particular difficulty in detecting powerpc. However, |
Thanks. For Darwin Intel based macOS that is reasonably up to date, the The only special Darwin case is the Darwin PowerPC case. The Darwin PowerPC has been in "End of Life" support and by default, doesn't necessarily have a C compiler that defaults to a reasonably recent C standard: unless someone has taken the trouble to install a more recent default C compiler. |
@lcn2 Is this what is needed? P. S. Re Intel, I meant of course <= 10.6. Sorry if I was not clear. But the flag can still be used unconditionally, AFAIK. |
Thanks, @barracuda156, With commit 3148ce0 Apple Power PC systems should now compile, by default, with:
This should make is easier for calc to compile on an Apple Power PC by default. Please fetch the top of the master branch and give us the output of: make calcinfo Then try: make clobber all chk && echo "All is OK" And if "All is OK" then try: make clobber all chk CCWERR=-Werror && echo "All is VERY OK" and see if "All is VERY OK". If something goes wrong, please attach another "calc_debug.log" file. |
The release of the next stable version of calc is pending your reply, as well as the process of updating the Debian version of calc. We are holding off those actions in case something more is needed for PowerPC. If at all possible, @barracuda156, please review comment 1657098727 above and respond before Friday 2023 Aug 4. Sorry to be in a rush and thanks for your help. |
@lcn2 Please allow me until tomorrow. Been a busy day, and it is almost 5 AM here, need to sleep :) I will update on this ASAP. |
Thanks .. tomorrow will be just fine. |
@lcn2 Will update in an hour or so on this. |
Thanks! |
A quick update: building from 9fcdd80 and running:
I do get All is okay:
(That But:
|
Hello @barracuda156, Please fetch the top of the master branch and give us the output of:
UPDATE 0We need this to fix the PowerPC issue. We have no PowerPC systems and cannot guess the proper parameters to shield older PowerPC systems from more modern code. We are convinced we can fix those issues if we know the PowerPC system parameters. That is WHY we have asked for data. UPDATE 1That is also WHY we need the output of |
Then with
(Install paths are wrong here, because I disabled build.args from Macports side.) I cannot run this totally without Macports, since then linking to dylibs fails. |
@lcn2 This is run without any Macports involvement beyond fetching and extract:
|
Hello @barracuda156, Just as an FYI: We do not use nor test macports for calc. Instead we use, test, and use recommend HomeBrew. Nevertheless, we also tend to use Intel and Apple Silicon processors running very recent macOS. We don't mind their challenge of supporting a PowerPC compilation, however. It is just a challenge to do so without such a system, so please accept our apologies. In regards to macports: @mattdm ( Matthew Miller ) has in the past, updated macports in behalf of calc. He has done and excellent job for calc under macports in the past. We only mention this in case you wish to continue to try and work the macports issues under a PowerPC. Nevertheless, your comment 1661064426 has given us an important clue as to what is missing from that older macOS for PowerPC. Please don't be discouraged, we will make another effort to resolve the above problems you have informed it about. You might find is better to compile calc by downloading the source to cd /usr/local
mkdir -p src/bin
cd src/bin
git clone https://github.com/lcn2/calc.git
cd calc And then trying to compile calc directly: cd /usr/local/src/bin/calc
clobber all chk && echo "All is OK" And if all is well: cd /usr/local/src/bin/calc
sudo make install Meanwhile, please consider accepting our apologies as we work to try and indirectly support calc on the PowerPC. Stay tuned for further updates! UPDATE 0To do the above suggested direct compile, you probably will need to install or have installed the macOS developer stuff including the command line utilities of Xcode for the PowerPC. |
Not intending to convince anyone in regard of personal preferences, but HomeBrew does not support PowerPC systems, AFAIK, and simply will not work there.
This is greatly appreciated.
How would changing the directory help though? (Besides, we want to fix |
Hmmm, that wasn't me, I'm afraid. |
Sorry for the confusion. |
We plan to use the information you provided to assist.
Back in the early macOS such as Mac OS X 10.4 Tiger, calc compiled directly on the Mac Power PC without Macports. We just used Xcode 2.x with the command line tools installation option. And while there have been changes to calc source that is causing warnings, calc compiled and worked even back then. Certainly by the for Mac OS X 10.6 Snow Leopard came around, calc was in heavy use on a number of PowerPCs and Xcode 4.2 worked well with calc. So we were just wondering if you have Xcode with the native PowerPC Unix command line tools installed, if those native non-macports tools produced a different set of results. We are trying to determine if there is a macports problem, or not. We are NOT trying to avoid addressing macports. We are just trying to debug things. Even later when we started using HomeBrew, we continue to compile using Apple's Xcode: although external libraries such as libhistory came from HomeBrew, the compiler, linker, include files, headers and system liberties are from macOS itself. We don't use Xcode to build calc: we only use the installed compiler, linker, include files, headers and system liberties. Those warnings about not finding It is OK to use macports for things like libhistory if you wish. We do the same for HomeBrew. Nevertheless we try to reply on the Apple supplied compilers and header files, etc. We see paths such as:
Assume you at rushing Mac OS X 10.6 Snow Leopard, you should have or be able to install Xcode such as Xcode 4.2. We are fairly sure that the So when we talk about compiling calc on native Power PC under Mac OS X, we are talking about using the Apple supplied compilers, header files, system libraries and Unix command line tools. Again you can link things like Thanks for your patience. We will make changes to assist your environment and the PowerPC. |
This is what Macports does as well on older systems. We can see from the log that Apple (Xcode) gcc-4.2 is picked; this compiler uses OS runtime libraries, not Macports ones. I need to verify which linker it picks (I suppose its own, Apple one), but we do not face any linking issues anyway, so that should be inconsequential.
Well, it was just easier to use Macports to do some mechanical work; in effect, it is the same as fetching directly from your repo.
There is no Xcode 4.2 for PowerPC. The last Xcode to support
|
What does the |
Thanks for the clarification. |
Hello @barracuda156, The
If that is not correct for your system, then add INCDIR=/the/path/to/usr/include to the end of your make commands. Please download commit 948d9e8 (top of the master branch) and attempt to compile calc and test as you do normally: make clobber all chk && echo "All is OK" and then if "All if OK", then please try: make clobber all chk CCWERR=-Werror && echo "All is Very OK" Thanks! |
@lcn2 I have found the info on |
@lcn2 Thank you, I will test that soon! |
@lcn2 Looks perfect now! Thank you very much!
|
Yea 🎉 |
Same failure with gcc-4.2 and gcc-12.
The text was updated successfully, but these errors were encountered: