Bug 696828 - unexpected token in '.type' directive
Summary: unexpected token in '.type' directive
Status: RESOLVED INVALID
Alias: None
Product: MuPDF
Classification: Unclassified
Component: mupdf (show other bugs)
Version: 1.9
Hardware: PC FreeBSD
: P4 normal
Assignee: MuPDF bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-07 21:28 UTC by Zsolt
Modified: 2016-06-19 05:55 UTC (History)
1 user (show)

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zsolt 2016-06-07 21:28:56 UTC
I want to build mupdf (with poudriere) on FreeBSD but I ran into the following error:
cc -O2 -pipe  -I/wrkdirs/usr/ports/graphics/mupdf/work/mupdf-1.9a-source/include/mupdf -I/wrkdirs/usr/ports/graphics/mupdf/work/mupdf-1.9a-source/thirdparty/mujs -fstack-protector -fno-strict-aliasing -Wall -DNDEBUG -fomit-frame-pointer -DHAVE_PTHREADS  -Iinclude -Igenerated -I/usr/local/include/freetype2   -I/usr/local/include/harfbuzz -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include     -DSHARE_JPEG  -I/usr/local/include/openjpeg-2.1     -o build/release/fonts/DroidSansFallback.o -c generated/DroidSansFallback.c -O0
<inline asm>:3:37: error: unexpected token in '.type' directive
.type fz_font_DroidSansFallback_ttc STT_OBJECT
                                    ^
1 error generated.
gmake[1]: *** [Makefile:178: build/release/fonts/DroidSansFallback.o] Error 1
gmake[1]: *** Waiting for unfinished jobs....
<inline asm>:3:41: error: unexpected token in '.type' directive
.type fz_font_DroidSansFallbackFull_ttc STT_OBJECT
                                        ^
1 error generated.
gmake[1]: *** [Makefile:178: build/release/fonts/DroidSansFallbackFull.o] Error 1
gmake[1]: Leaving directory '/wrkdirs/usr/ports/graphics/mupdf/work/mupdf-1.9a-source'


The full log can found here: http://freebsd.uzsolt.hu/logs/mupdf/mupdf-1.9%2C1-unexpected_token.log

Thanks for you work!
Comment 1 Robin Watts 2016-06-10 06:55:59 UTC
We have some #ifdef logic in the code generated by fontdump that goes:

#ifndef __STRICT_ANSI__
#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)
#if !defined(__ICC)
#define HAVE_INCBIN
#endif
#endif
#endif

That is enabling HAVE_INCBIN for FreeBSD builds, but your toolset does not support it.

Remove the #define HAVE_INCBIN line (or better, edit fontdump.c to avoid outputting that line), and you should be Ok.

Please let us know how you get on.
Comment 2 Zsolt 2016-06-12 02:38:27 UTC
It causes many other "undefinied reference to..." errors: http://freebsd.uzsolt.hu/logs/mupdf/mupdf-1.9a%2C1-undefinied_reference.log
The applied patch: http://freebsd.uzsolt.hu/diff/patch-scripts_fontdump.c
Comment 3 Robin Watts 2016-06-18 08:31:15 UTC
The problem is with freebsd's packaging and with javascript stuff being missed.

Use the latest version from our git, and you'll be fine.
Comment 4 Zsolt 2016-06-19 05:55:05 UTC
Ooops, you've right. It was my fault.
It seems the attached patch works.

Thank for your help!