[sword-devel] How do you make the Sword framework work in 64bit mode? (My compiler is giving me hundreds of warnings.)

TS outofthecube at icloud.com
Wed Nov 2 19:07:42 MST 2016


Hi,

Ok, so I was able to download Revision 3441 which I think is the most recent version of SWORD? (at least at the time.)

I’ve been working on getting it to work with the PocketSword code. There’s a bit of code and changes which needed to be made in order for it to work. I thought I could just replace the old code, but it doesn’t work like that. Are these changes documented anywhere? There’s only some listed in the SWORD-HOWTO named file that’s in the /objc/doc folder of the Bindings folder. I’ve been troubleshooting through in order to get things working. Also, I eventually wound up running a comparison of the entire Sword folder to what currently exists in order to find the differences in the code parts.

Has there been any more updates on the code to make it more 64-bit ? 
It’s a lot better, but there’s still a lot of warnings regarding the matter that Xcode gives me. I’m considering the CLucene warnings as part of it all as well though I’m not sure if I should or not?

There also seems to be a couple of bugs or so, which I’ll put in the tracker.

Also, I’m not sure if it matters or not, but just fyi, Xcode 7.3.1 uses C99 for the C language dialect.

-TS  

> On Oct 25, 2016, at 1:32 AM, Peter von Kaehne <refdoc at gmx.net> wrote:
> 
> Check out our wiki, it has repos etc listed. 
> 
> Sent from my phone. Apologies for brevity and typos.On 25 Oct 2016 9:09 am, TS <outofthecube at icloud.com> wrote:
>> 
>> Thank you! For the codebase that you updated, is there somewhere that I can download it to see the changes?
>> 
>> Xcode is giving me warnings, not errors, so it is technically compiling ok in that regard. (However, that does not necessarily mean that it’s ok to compile things that way.)
>> 
>> Manfred and Jaak both wrote earlier in this thread regarding how it runs on Mac and Linux. There’s issues in both cases.
>> 
>> The last official release of PocketSword was not compiled for 64-bit as far as I can tell from the download on the website for it. The project’s setting is set for 32-bit only, and not for 64-bit, though I could be mistaken.
>> 
>> Your welcome reg. the bug report.
>> 
>> -TS
>> 
>>> On Oct 23, 2016, at 1:44 AM, Troy A. Griffitts <scribe at crosswire.org> wrote:
>>> 
>> Dear TS,
>> 
>> Thank you for the spreadsheet.  I've had a review of the implicit cast warning and determined where the casts were safe and added explicit casts.  This should remove most of these warnings for you.  Have you actually had a problem compiling SWORD for 64bit or were just concerned about warnings?  Manfred and Nic should be able to answer better, but I'm quite sure we've been running 64bit on OSX for quite some time; not sure about iOS.
>> 
>> Thanks also for the report on the missing [] in the delete in swld.
>> 
>> You should have better results with svn HEAD.  Please keep us posted.
>> 
>> Troy
>> 
>>  
>> On 10/19/2016 12:58 PM, TS wrote:
>> 
>> Hi Peter, thank you for your help in this. I made the following for you and anyone else interested. I hope it’ll help you better identify and understand the warnings and/or type of warnings that we are seeing. I’m not really that familiar with how clang and llvm nor autotools works so I don’t know what changes to suggest so this is the next best thing that I thought of. (Perhaps it is something I should investigate…?)
>> 
>>      In order to create the numeric breakdown that I posted earlier, I copied and pasted the warnings Xcode gave me into a spreadsheet and sorted the data. Here is a copy of the final spreadsheet that was done:
>> 
>> https://dl.dropboxusercontent.com/u/1472406/XCode%20Warnings.ods
>> 
>>      On the left columns, I’ve used formulas to label which are warnings occurring in a Sword file or CLucene file. Whatever is not one of those is something else, but those are a minor amount in comparison and I think are PocketSword files unrelated to the Sword framework files. 
>> There’s also 3 warnings which are not 64-bit related which I’ve marked in yellow and that I already know about.
>> 
>> On the right side of the sheet, I separated out the file locations and their matching warnings into separate columns.
>> 
>> So, overall, this should give you an organized list of the warnings that Xcode gives providing the file name and the warning. Next to the file names are numbers. The first number is the row number in which the error occurs and then the second number is the number of spaces from the left that the warning is at. (Tabs/indents seem to count as one space)
>> 
>> I kept it as an OpenOffice doc in order to preserve the formulas I used to sort the errors. It should help you to organize and sort the data if you so desire. If you can’t open it though, just let me know and I can save it in a different format and etc.
>> 
>> Thank you,
>> TS
>> 
>>> On Oct 19, 2016, at 2:44 AM, Peter Von Kaehne <refdoc at gmx.net> wrote:
>>> 
>>>> Gesendet: Mittwoch, 19. Oktober 2016 um 09:24 Uhr
>>>> Von: "Manfred Bergmann" <manfred.bergmann at me.com>b. Is it possible that 
>>>> 
>>>> Per default Xcode uses the C compiler of LLVM.
>>> 
>>> 
>>> Ok. 
>>> 
>>> I have tried compiling with clang/llvm on Linux just now, but likely made a few/lot mistakes....
>>> 
>>> CC=clang ./configure 
>>> make
>>> 
>>> produced a few (less than 10) warnings re string/char  conversions at one point, in one function only but worked as such. Not tried the result.
>>> 
>>> CC=clang++ ./configure
>>> make 
>>> 
>>> produced the same warnings but then failed at the linking stage. 
>>> 
>>> But the config.log had still ample references to gcc so I am not sure if this was really the right approach. Can you suggest how to change the compiler properly within the autotools setup? 
>>> 
>>> Peter
>>> 
>>> _______________________________________________
>>> sword-devel mailing list: sword-devel at crosswire.org
>>> http://www.crosswire.org/mailman/listinfo/sword-devel
>>> Instructions to unsubscribe/change your settings at above page
>> 
>> 
>> 
>> 
>> _______________________________________________
>> 
>> sword-devel mailing list: sword-devel at crosswire.org
>> 
>> http://www.crosswire.org/mailman/listinfo/sword-devel
>> 
>> Instructions to unsubscribe/change your settings at above page
>> 
>> 
>> _______________________________________________
>> sword-devel mailing list: sword-devel at crosswire.org
>> http://www.crosswire.org/mailman/listinfo/sword-devel
>> Instructions to unsubscribe/change your settings at above page
>> 
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page




More information about the sword-devel mailing list