Skip to content

help make editors/texstudio compile with a static_cast<float> #154

Description

@hoewweken

Texstudio shows an error while compiling:

The patch is easy, add a static_cast in src/pdfviewer/PDFDocument.cpp

grep log10 pdfviewer/PDFDocument.cpp
int maxDigits = 1 + qFloor(log10(static_cast(pdfWidget->realNumPages())));

Please integrate this..

Activity

  1. hoewweken commented on Oct 31, 2018

    @hoewweken
    Author

    after patching this the link fails with
    ld: fatal: -p option is incompatible with building a static object (-dn, -r, --relocatable)

    there is no "-p" option in the respective commandline, so i don't know how to search for a possible fix of this..

  2. self-assigned this
    on Oct 31, 2018
  3. jperkin commented on Oct 31, 2018

    @jperkin
    Collaborator

    I've fixed this in trunk, thanks for the report!

  4. hoewweken commented on Oct 31, 2018

    @hoewweken
    Author

    I'm sorry, but its not done yet..

    With hunspell enabled (i think it is by default) we hace two replace NULL with FLAG_NULL tow times in hunspell/affentry.hxx

    grep NULL work/texstudio2.12.6/hunspell/affentry.hxx
    const FLAG needflag = FLAG_NULL);
    struct hentry * check_twosfx(const char * word, int len, char in_compound, const FLAG needflag = FLAG_NULL);
    const FLAG needflag = FLAG_NULL);
    char in_compound, const FLAG needflag = FLAG_NULL);
    // const FLAG cclass = FLAG_NULL, const FLAG needflag = FLAG_NULL, char in_compound=IN_CPD_NOT);
    const FLAG cclass = FLAG_NULL, const FLAG needflag = FLAG_NULL, const FLAG badflag = 0);
    struct hentry * check_twosfx(const char * word, int len, int optflags, PfxEntry* ppfx, const FLAG needflag = FLAG_NULL);
    PfxEntry* ppfx, const FLAG needflag = FLAG_NULL);

    With this additional patch, the compile seems to be ready, but does not link

    ld: fatal: -p option is incompatible with building a static object (-dn, -r, --relocatable)
    ld: fatal: flags processing errors
    collect2: error: ld returned 1 exit status
    *** [texstudio] Error code 1

    bmake: stopped in /tank/pkgsrc/trunk/pkgsrc/editors/texstudio/work/texstudio2.12.6
    1 error

  5. jperkin commented on Nov 1, 2018

    @jperkin
    Collaborator

    Make sure you rebuilt x11/qt5-qtbase, I made a change there to fix the -p issue. As for the hunspell problem, I don't see that (and the package doesn't use PKG_OPTIONS), so will need further details on how to trigger it.

  6. added a commit that references this issue on Nov 20, 2018
  7. added a commit that references this issue on Dec 1, 2018
  8. added a commit that references this issue on Feb 13, 2019
  9. added a commit that references this issue on Mar 26, 2019
  10. added a commit that references this issue on Sep 2, 2019
  11. added a commit that references this issue on Oct 20, 2019
  12. added a commit that references this issue on Nov 6, 2019
  13. 97 remaining items

  14. added a commit that references this issue on Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions