Bug 199487 - editors/texstudio: Does not build on ARM
Summary: editors/texstudio: Does not build on ARM
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm Any
: --- Affects Some People
Assignee: Max Brazhnikov
URL:
Keywords: needs-qa, patch
Depends on: 202511
Blocks:
  Show dependency treegraph
 
Reported: 2015-04-16 18:02 UTC by Ulrich Grey
Modified: 2015-08-24 21:09 UTC (History)
4 users (show)

See Also:
bugzilla: maintainer-feedback? (abiliojr)


Attachments
fix for armv6 (1.61 KB, patch)
2015-04-17 07:59 UTC, Mikael Urankar
koobs: maintainer-approval? (abiliojr)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrich Grey 2015-04-16 18:02:39 UTC
If I try to compile editors/texstudio-2.8.8_1 on an wandboard-quad (FreeBSD 11.0-CURRENT #1 r281266M),
I get this:

--- .obj/debughelper.o ---
debughelper.cpp:993:20: error: no member named 'arm_pc' in 'mcontext_t'
        this->pc = (char*)PC_FROM_UCONTEXT(context);
                          ^~~~~~~~~~~~~~~~~~~~~~~~~
debughelper.cpp:502:58: note: expanded from macro 'PC_FROM_UCONTEXT'
#define PC_FROM_UCONTEXT(context) (context)->uc_mcontext.arm_pc
                                  ~~~~~~~~~~~~~~~~~~~~~~ ^
debughelper.cpp:994:23: error: no member named 'arm_fp' in 'mcontext_t'
        this->frame = (char*)FRAME_FROM_UCONTEXT(context);
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
debughelper.cpp:504:61: note: expanded from macro 'FRAME_FROM_UCONTEXT'
#define FRAME_FROM_UCONTEXT(context) (context)->uc_mcontext.arm_fp
                                     ~~~~~~~~~~~~~~~~~~~~~~ ^
debughelper.cpp:995:23: error: no member named 'arm_sp' in 'mcontext_t'
        this->stack = (char*)STACK_FROM_UCONTEXT(context);
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
debughelper.cpp:503:61: note: expanded from macro 'STACK_FROM_UCONTEXT'
#define STACK_FROM_UCONTEXT(context) (context)->uc_mcontext.arm_sp
                                     ~~~~~~~~~~~~~~~~~~~~~~ ^
debughelper.cpp:997:26: error: no member named 'arm_lr' in 'mcontext_t'
        this->returnTo = (char*)RETURNTO_FROM_UCONTEXT(context);
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
debughelper.cpp:505:64: note: expanded from macro 'RETURNTO_FROM_UCONTEXT'
#define RETURNTO_FROM_UCONTEXT(context) (context)->uc_mcontext.arm_lr
                                        ~~~~~~~~~~~~~~~~~~~~~~ ^
debughelper.cpp:1004:13: error: no member named 'arm_pc' in 'mcontext_t'
        *(char**)(&PC_FROM_UCONTEXT(context)) = this->pc;
                   ^~~~~~~~~~~~~~~~~~~~~~~~~
debughelper.cpp:502:58: note: expanded from macro 'PC_FROM_UCONTEXT'
#define PC_FROM_UCONTEXT(context) (context)->uc_mcontext.arm_pc
                                  ~~~~~~~~~~~~~~~~~~~~~~ ^
debughelper.cpp:1005:13: error: no member named 'arm_fp' in 'mcontext_t'
        *(char**)(&FRAME_FROM_UCONTEXT(context)) = this->frame;
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
debughelper.cpp:504:61: note: expanded from macro 'FRAME_FROM_UCONTEXT'
#define FRAME_FROM_UCONTEXT(context) (context)->uc_mcontext.arm_fp
                                     ~~~~~~~~~~~~~~~~~~~~~~ ^
debughelper.cpp:1006:13: error: no member named 'arm_sp' in 'mcontext_t'
        *(char**)(&STACK_FROM_UCONTEXT(context)) = this->stack;
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
debughelper.cpp:503:61: note: expanded from macro 'STACK_FROM_UCONTEXT'
#define STACK_FROM_UCONTEXT(context) (context)->uc_mcontext.arm_sp
                                     ~~~~~~~~~~~~~~~~~~~~~~ ^
debughelper.cpp:1008:13: error: no member named 'arm_lr' in 'mcontext_t'
        *(char**)(&RETURNTO_FROM_UCONTEXT(context)) = this->returnTo;
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
debughelper.cpp:505:64: note: expanded from macro 'RETURNTO_FROM_UCONTEXT'
#define RETURNTO_FROM_UCONTEXT(context) (context)->uc_mcontext.arm_lr
                                        ~~~~~~~~~~~~~~~~~~~~~~ ^
8 errors generated.
*** [.obj/debughelper.o] Error code 1

make[1]: stopped in /usr/local/DEVEL/ports/editors/texstudio/work/texstudio2.8.8
1 error

make[1]: stopped in /usr/local/DEVEL/ports/editors/texstudio/work/texstudio2.8.8
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make: stopped in /usr/local/DEVEL/ports/editors/texstudio

===>>> make build failed for editors/texstudio
===>>> Aborting update


===>>> You can restart from the point of failure with this command line:
       portmaster <flags> editors/texstudio
Comment 1 Mikael Urankar freebsd_committer freebsd_triage 2015-04-17 07:59:07 UTC
Created attachment 155664 [details]
fix for armv6

Can you try the attached patch?
Comment 2 Ulrich Grey 2015-04-17 09:24:16 UTC
(In reply to mikael.urankar from comment #1)
Thank you for the patch.
I have tried it and the build finished successfully.
Comment 3 Ulrich Grey 2015-04-17 09:58:22 UTC
I have done some testing with editors/texstudio. I can compile a LaTeX file and graphics/xpdf shows me the correct output. But when I try to use the builtin preview, texstudio crashes:

% texstudio
QPixmap::scaleHeight: Pixmap is a null pixmap
QPixmap::scaleHeight: Pixmap is a null pixmap
QPixmap::scaled: Pixmap is a null pixmap
QCursor: Cannot create bitmap cursor; invalid bitmap(s)
QPixmap::scaled: Pixmap is a null pixmap
QCursor: Cannot create bitmap cursor; invalid bitmap(s)
QPixmap::scaled: Pixmap is a null pixmap
QCursor: Cannot create bitmap cursor; invalid bitmap(s)
Bus error (core dumped)

(The pdf-file is ok.)

I guess, this is related to graphics/poppler.
I have the same issue with editors/texworks.
Comment 4 Glen Barber freebsd_committer freebsd_triage 2015-07-07 13:45:23 UTC
Supersceded by 199512.

Thank you for your submission.
Comment 5 Glen Barber freebsd_committer freebsd_triage 2015-07-07 13:52:04 UTC
Apologies.  The patch was not committed, and this is still an issue.
Comment 6 commit-hook freebsd_committer freebsd_triage 2015-08-24 21:01:34 UTC
A commit references this bug:

Author: makc
Date: Mon Aug 24 21:00:39 UTC 2015
New revision: 395189
URL: https://svnweb.freebsd.org/changeset/ports/395189

Log:
  editors/texstudio:
  - Add patch to fix build on armv6 [1,2]
  - Add option to build with Qt 4 or 5, enable Qt 5 by default [2]
  - Remove needless INSTALLS_ICONS

  PR:		199487 [1]
  Reported by:	Ulrich Grey
  Patch by:	mikael.urankar@gmail.com

  PR:		202511 [2]
  Submitted by:	Abilio Marques (maintainer)

Changes:
  head/editors/texstudio/Makefile
  head/editors/texstudio/files/
  head/editors/texstudio/files/patch-debughelper.cpp