#187 1.2.0.8 does not compile

v1.2.0.9
closed-fixed
nobody
None
5
2013-12-12
2012-09-19
Simon Wiles
No

Debian Wheezy 64bit

g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"xmlcopyeditor\" -DVERSION=\"1.2.0.8\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I. -I/usr/include/libxml2 -Wall -g -fexceptions -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -Wall -g -fexceptions -Wall -g -fexceptions -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -MT mypropertysheet.o -MD -MP -MF .deps/mypropertysheet.Tpo -c -o mypropertysheet.o mypropertysheet.cpp
mypropertysheet.cpp: In constructor ‘MyPropertySheet::MyPropertySheet(wxWindow*, XmlCtrlProperties&, wxString&, bool, bool, bool, bool, bool, bool, bool, bool, int, const std::set<const wxLanguageInfo*>&, wxWindowID, wxString, const wxPoint&, const wxSize&, long int)’:
mypropertysheet.cpp:178:50: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
mypropertysheet.cpp: In member function ‘void MyPropertySheet::OnOk(wxCommandEvent&)’:
mypropertysheet.cpp:279:56: error: cast from ‘void*’ to ‘int’ loses precision [-fpermissive]
make[1]: *** [mypropertysheet.o] Error 1
make[1]: Leaving directory `/home/simon/Desktop/xmlcopyeditor-1.2.0.8/src'
make: *** [all-recursive] Error 1

(Note: I am attempting to compile from source as the 1.2.0.6-2+b1 version from the Debian repos sgefaults trying to open the "open file" dialogue)

Any advice?

Related

Bugs: #201

Discussion

  • Zane U. Ji
    Zane U. Ji
    2012-09-21

    Please replace int with intptr_t, from <stdint.h>.

     
  • Simon Wiles
    Simon Wiles
    2012-09-22

    thanks, I can confirm that that works, and I can now compile 1.2.0.8 :)

     
  • djscholl
    djscholl
    2012-10-01

    The same issue has been observed with 64-bit Arch Linux. The suggested fix worked on Arch as well, thanks.
    It does not produce any apparent issues with 32-bit Arch Linux.
    I implemented the fix in the xmlcopyeditor package in the Arch User Repository.
    In line 279 of src/mypropertysheet.cpp, change (int)languageBox to (intptr_t)languageBox.
    E.g., sed 's/(int)languageBox/(intptr_t)languageBox/' -i src/mypropertysheet.cpp

     
  • donflow
    donflow
    2012-12-20

    I can confirm this issue on Linux Mint 14 64bit
    Thank you for the fix!

     
  • Zane U. Ji
    Zane U. Ji
    2013-11-02

    [5e0c1c]

    Please feel free to reopen it if it has not been fixed.

     

    Related

    Commit: [5e0c1c]

  • Zane U. Ji
    Zane U. Ji
    2013-11-02

    • status: open --> closed-fixed
    • Group: --> v1.2.0.10
     
  • Zane U. Ji
    Zane U. Ji
    2013-12-12

    • Group: Bugs --> v1.2.0.9