{"action":"opened","issue":{"url":"https://api.github.com/repos/mxe/mxe/issues/970","labels_url":"https://api.github.com/repos/mxe/mxe/issues/970/labels{/name}","comments_url":"https://api.github.com/repos/mxe/mxe/issues/970/comments","events_url":"https://api.github.com/repos/mxe/mxe/issues/970/events","html_url":"https://github.com/mxe/mxe/issues/970","id":115710641,"number":970,"title":"sdl2_image and freetype seems broken","user":{"login":"remyroy","id":303593,"avatar_url":"https://avatars.githubusercontent.com/u/303593?v=3","gravatar_id":"","url":"https://api.github.com/users/remyroy","html_url":"https://github.com/remyroy","followers_url":"https://api.github.com/users/remyroy/followers","following_url":"https://api.github.com/users/remyroy/following{/other_user}","gists_url":"https://api.github.com/users/remyroy/gists{/gist_id}","starred_url":"https://api.github.com/users/remyroy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/remyroy/subscriptions","organizations_url":"https://api.github.com/users/remyroy/orgs","repos_url":"https://api.github.com/users/remyroy/repos","events_url":"https://api.github.com/users/remyroy/events{/privacy}","received_events_url":"https://api.github.com/users/remyroy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-08T05:39:17Z","updated_at":"2015-11-08T05:39:17Z","closed_at":null,"body":"Hello,\r\n\r\nI'm currently updating the instructions to cross-compile [CataclysmDDA](https://github.com/CleverRaven/Cataclysm-DDA) to Windows from Linux. We want to use the latest version for MXE. Unfortunately, it seems like the sdl2_image and freetype packages are broken for us. Here is our output: \r\n\r\n```\r\n~/src/mxe/usr/bin/i686-w64-mingw32.static-g++ -Wl,-stack,12000000,-subsystem,windows -o cataclysm-tiles.exe objwin/tiles/rng.o objwin/tiles/iuse_software.o objwin/tiles/mongroup.o objwin/tiles/animation.o objwin/tiles/mission.o objwin/tiles/options.o objwin/tiles/iuse_actor.o objwin/tiles/veh_interact.o objwin/tiles/activity_item_handling.o objwin/tiles/text_snippets.o objwin/tiles/monster.o objwin/tiles/ammo.o objwin/tiles/savegame_legacy.o objwin/tiles/armor_layers.o objwin/tiles/requirements.o objwin/tiles/sdltiles.o objwin/tiles/char_validity_check.o objwin/tiles/init.o objwin/tiles/line.o objwin/tiles/basecamp.o objwin/tiles/event.o objwin/tiles/monmove.o objwin/tiles/name.o objwin/tiles/npcmove.o objwin/tiles/artifact.o objwin/tiles/bionics.o objwin/tiles/scenario.o objwin/tiles/cata_tiles.o objwin/tiles/dependency_tree.o objwin/tiles/iuse.o objwin/tiles/mapgenformat.o objwin/tiles/main_menu.o objwin/tiles/computer.o objwin/tiles/editmap.o objwin/tiles/catalua.o objwin/tiles/monattack.o objwin/tiles/posix_time.o objwin/tiles/faction.o objwin/tiles/ui.o objwin/tiles/weather_data.o objwin/tiles/tileray.o objwin/tiles/sounds.o objwin/tiles/game.o objwin/tiles/version.o objwin/tiles/gamemode.o objwin/tiles/mission_start.o objwin/tiles/mondefense.o objwin/tiles/messages.o objwin/tiles/action.o objwin/tiles/addiction.o objwin/tiles/input.o objwin/tiles/color.o objwin/tiles/savegame.o objwin/tiles/construction.o objwin/tiles/mission_end.o objwin/tiles/mutation_data.o objwin/tiles/iexamine.o objwin/tiles/wincurse.o objwin/tiles/monfaction.o objwin/tiles/mondeath.o objwin/tiles/mod_manager_ui.o objwin/tiles/submap.o objwin/tiles/mission_fail.o objwin/tiles/overmap.o objwin/tiles/mtype.o objwin/tiles/martialarts.o objwin/tiles/map.o objwin/tiles/creature.o objwin/tiles/filesystem.o objwin/tiles/item.o objwin/tiles/inventory.o objwin/tiles/itype.o objwin/tiles/bodypart.o objwin/tiles/auto_pickup.o objwin/tiles/cursesport.o objwin/tiles/main.o objwin/tiles/clzones.o objwin/tiles/pickup.o objwin/tiles/skill.o objwin/tiles/trap.o objwin/tiles/effect.o objwin/tiles/debug.o objwin/tiles/npctalk.o objwin/tiles/inventory_ui.o objwin/tiles/weather_gen.o objwin/tiles/pathfinding.o objwin/tiles/monstergenerator.o objwin/tiles/simplexnoise.o objwin/tiles/item_factory.o objwin/tiles/speech.o objwin/tiles/vehicle.o objwin/tiles/item_group.o objwin/tiles/translations.o objwin/tiles/path_info.o objwin/tiles/iuse_software_sokoban.o objwin/tiles/overmapbuffer.o objwin/tiles/live_view.o objwin/tiles/tutorial.o objwin/tiles/catacharset.o objwin/tiles/profession.o objwin/tiles/worldfactory.o objwin/tiles/defense.o objwin/tiles/mapbuffer.o objwin/tiles/weather.o objwin/tiles/wish.o objwin/tiles/veh_type.o objwin/tiles/iuse_software_snake.o objwin/tiles/savegame_json.o objwin/tiles/crafting.o objwin/tiles/active_item_cache.o objwin/tiles/player.o objwin/tiles/start_location.o objwin/tiles/mapdata.o objwin/tiles/nonplayer.o objwin/tiles/vehicle_group.o objwin/tiles/npc.o objwin/tiles/mutation.o objwin/tiles/field.o objwin/tiles/help.o objwin/tiles/creature_tracker.o objwin/tiles/material.o objwin/tiles/melee.o objwin/tiles/mapsharing.o objwin/tiles/mapgen_functions.o objwin/tiles/mapgen.o objwin/tiles/advanced_inv.o objwin/tiles/mod_manager.o objwin/tiles/character.o objwin/tiles/missiondef.o objwin/tiles/mission_place.o objwin/tiles/newcharacter.o objwin/tiles/calendar.o objwin/tiles/item_location.o objwin/tiles/activity_handlers.o objwin/tiles/json.o objwin/tiles/iuse_software_kitten.o objwin/tiles/trapfunc.o objwin/tiles/lightmap.o objwin/tiles/mission_companion.o objwin/tiles/player_activity.o objwin/tiles/ranged.o objwin/tiles/item_action.o objwin/tiles/damage.o objwin/tiles/output.o objwin/tiles/resource.o -lwebp -lcomctl32 -lharfbuzz -lws2_32 -s -static -lintl -liconv -lSDL2_mixer -lvorbisfile -lvorbis -logg -lmodplug -lsmpeg2 -lstdc++ -L/home/hidden/src/mxe/usr/i686-w64-mingw32.static/lib -lmingw32 -lSDL2 -mwindows -Wl,--no-undefined -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lversion -luuid -static-libgcc -lm -lvorbisfile -lvorbis -logg -llua -L/home/hidden/src/mxe/usr/i686-w64-mingw32.static/lib -lmingw32 -lSDL2 -mwindows -Wl,--no-undefined -lm -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lversion -luuid -static-libgcc -lSDL2_ttf -lSDL2_image -lfreetype -lpng -lz -ljpeg -lbz2 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lversion\r\n/home/hidden/src/mxe/usr/i686-w64-mingw32.static/lib/libSDL2_image.a(IMG_webp.o): In function `IMG_InitWEBP':\r\n/home/hidden/src/mxe/tmp-sdl2_image-i686-w64-mingw32.static/SDL2_image-2.0.0/IMG_webp.c:116: undefined reference to `WebPGetFeaturesInternal'\r\n/home/hidden/src/mxe/tmp-sdl2_image-i686-w64-mingw32.static/SDL2_image-2.0.0/IMG_webp.c:117: undefined reference to `WebPDecodeRGBInto'\r\n/home/hidden/src/mxe/tmp-sdl2_image-i686-w64-mingw32.static/SDL2_image-2.0.0/IMG_webp.c:118: undefined reference to `WebPDecodeRGBAInto'\r\n/home/hidden/src/mxe/usr/i686-w64-mingw32.static/lib/libfreetype.a(autofit.o): In function `af_face_globals_free':\r\n/home/hidden/src/mxe/tmp-freetype-i686-w64-mingw32.static/freetype-2.6.1/src/autofit/afglobal.c:405: undefined reference to `hb_font_destroy'\r\n/home/hidden/src/mxe/usr/i686-w64-mingw32.static/lib/libfreetype.a(autofit.o): In function `af_get_char_index':\r\n/home/hidden/src/mxe/tmp-freetype-i686-w64-mingw32.static/freetype-2.6.1/src/autofit/hbshim.c:448: undefined reference to `hb_buffer_create'\r\n/home/hidden/src/mxe/tmp-freetype-i686-w64-mingw32.static/freetype-2.6.1/src/autofit/hbshim.c:458: undefined reference to `hb_font_set_scale'\r\n/home/hidden/src/mxe/tmp-freetype-i686-w64-mingw32.static/freetype-2.6.1/src/autofit/hbshim.c:461: undefined reference to `hb_buffer_set_direction'\r\n/home/hidden/src/mxe/tmp-freetype-i686-w64-mingw32.static/freetype-2.6.1/src/autofit/hbshim.c:462: undefined reference to `hb_buffer_set_script'\r\n/home/hidden/src/mxe/tmp-freetype-i686-w64-mingw32.static/freetype-2.6.1/src/autofit/hbshim.c:465: undefined reference to `hb_buffer_add_utf32'\r\n/home/hidden/src/mxe/tmp-freetype-i686-w64-mingw32.static/freetype-2.6.1/src/autofit/hbshim.c:468: undefined reference to `hb_shape'\r\n/home/hidden/src/mxe/tmp-freetype-i686-w64-mingw32.static/freetype-2.6.1/src/autofit/hbshim.c:470: undefined reference to `hb_buffer_get_glyph_infos'\r\n/home/hidden/src/mxe/tmp-freetype-i686-w64-mingw32.static/freetype-2.6.1/src/autofit/hbshim.c:471: undefined reference to `hb_buffer_get_glyph_positions'\r\n/home/hidden/src/mxe/tmp-freetype-i686-w64-mingw32.static/freetype-2.6.1/src/autofit/hbshim.c:488: undefined reference to `hb_buffer_destroy'\r\n/home/hidden/src/mxe/usr/i686-w64-mingw32.static/lib/libfreetype.a(autofit.o): In function `af_get_coverage':\r\n/home/hidden/src/mxe/tmp-freetype-i686-w64-mingw32.static/freetype-2.6.1/src/autofit/hbshim.c:126: undefined reference to `hb_font_get_face'\r\n/home/hidden/src/mxe/tmp-freetype-i686-w64-mingw32.static/freetype-2.6.1/src/autofit/hbshim.c:128: undefined reference to `hb_set_create'\r\n/home/hidden/src/mxe/tmp-freetype-i686-w64-mingw32.static/freetype-2.6.1/src/autofit/hbshim.c:129: undefined reference to `hb_set_create'\r\n/home/hidden/src/mxe/tmp-freetype-i686-w64-mingw32.static/freetype-2.6.1/src/autofit/hbshim.c:130: undefined reference to `hb_set_create'\r\n/home/hidden/src/mxe/tmp-freetype-i686-w64-mingw32.static/freetype-2.6.1/src/autofit/hbshim.c:131: undefined reference to `hb_set_create'\r\n/home/hidden/src/mxe/tmp-freetype-i686-w64-mingw32.static/freetype-2.6.1/src/autofit/hbshim.c:139: undefined reference to `hb_ot_tags_from_script'\r\n/home/hidden/src/mxe/tmp-freetype-i686-w64-mingw32.static/freetype-2.6.1/src/autofit/hbshim.c:165: undefined reference to `hb_ot_layout_collect_lookups'\r\n/home/hidden/src/mxe/tmp-freetype-i686-w64-mingw32.static/freetype-2.6.1/src/autofit/hbshim.c:172: undefined reference to `hb_set_is_empty'\r\n/home/hidden/src/mxe/tmp-freetype-i686-w64-mingw32.static/freetype-2.6.1/src/autofit/hbshim.c:381: undefined reference to `hb_set_destroy'\r\n/home/hidden/src/mxe/tmp-freetype-i686-w64-mingw32.static/freetype-2.6.1/src/autofit/hbshim.c:382: undefined reference to `hb_set_destroy'\r\n/home/hidden/src/mxe/tmp-freetype-i686-w64-mingw32.static/freetype-2.6.1/src/autofit/hbshim.c:383: undefined reference to `hb_set_destroy'\r\n/home/hidden/src/mxe/tmp-freetype-i686-w64-mingw32.static/freetype-2.6.1/src/autofit/hbshim.c:384: undefined reference to `hb_set_destroy'\r\n/home/hidden/src/mxe/tmp-freetype-i686-w64-mingw32.static/freetype-2.6.1/src/autofit/hbshim.c:175: undefined reference to `hb_ot_layout_collect_lookups'\r\n/home/hidden/src/mxe/tmp-freetype-i686-w64-mingw32.static/freetype-2.6.1/src/autofit/hbshim.c:198: undefined reference to `hb_ot_layout_lookup_collect_glyphs'\r\n/home/hidden/src/mxe/tmp-freetype-i686-w64-mingw32.static/freetype-2.6.1/src/autofit/hbshim.c:190: undefined reference to `hb_set_next'\r\n/home/hidden/src/mxe/tmp-freetype-i686-w64-mingw32.static/freetype-2.6.1/src/autofit/hbshim.c:229: undefined reference to `hb_ot_layout_lookup_collect_glyphs'\r\n/home/hidden/src/mxe/tmp-freetype-i686-w64-mingw32.static/freetype-2.6.1/src/autofit/hbshim.c:221: undefined reference to `hb_set_next'\r\n/home/hidden/src/mxe/tmp-freetype-i686-w64-mingw32.static/freetype-2.6.1/src/autofit/hbshim.c:270: undefined reference to `hb_set_next'\r\n/home/hidden/src/mxe/tmp-freetype-i686-w64-mingw32.static/freetype-2.6.1/src/autofit/hbshim.c:276: undefined reference to `hb_ot_layout_lookup_would_substitute'\r\n/home/hidden/src/mxe/tmp-freetype-i686-w64-mingw32.static/freetype-2.6.1/src/autofit/hbshim.c:341: undefined reference to `hb_set_subtract'\r\n/home/hidden/src/mxe/tmp-freetype-i686-w64-mingw32.static/freetype-2.6.1/src/autofit/hbshim.c:348: undefined reference to `hb_set_next'\r\n/home/hidden/src/mxe/usr/i686-w64-mingw32.static/lib/libfreetype.a(autofit.o): In function `af_face_globals_new':\r\n/home/hidden/src/mxe/tmp-freetype-i686-w64-mingw32.static/freetype-2.6.1/src/autofit/afglobal.c:360: undefined reference to `hb_ft_font_create'\r\ncollect2: error: ld returned 1 exit status\r\nMakefile:457: recipe for target 'cataclysm-tiles.exe' failed\r\nmake: *** [cataclysm-tiles.exe] Error 1\r\n```\r\n*****\r\n## Here are our new instructions to cross-compile CataclysmDDA:\r\n\r\nInstall:\r\n\r\n    sudo apt-get install autoconf automake autopoint bash bison bzip2 cmake flex gettext git g++ gperf intltool libffi-dev libgdk-pixbuf2.0-dev libtool libltdl-dev libssl-dev libxml-parser-perl make openssl p7zip-full patch perl pkg-config python ruby scons sed unzip wget xz-utils g++-multilib libc6-dev-i386 libtool-bin\r\n    mkdir -p ~/src/mxe\r\n    git clone https://github.com/mxe/mxe.git ~/src/mxe\r\n    cd ~/src/mxe\r\n    make MXE_TARGETS='x86_64-w64-mingw32.static i686-w64-mingw32.static' sdl2 sdl2_ttf sdl2_image sdl2_mixer gettext lua\r\n\r\nIf you are not on a Debian derivative (Linux Mint, Ubuntu, etc), you will have to use a different command than apt-get to install [the MXE requirements](http://mxe.cc/#requirements). Building all these packages from MXE might take a while even on a fast computer. Be patient. If you are not planning on building for both 32-bit and 64-bit, you might want to adjust your MXE_TARGETS.\r\n\r\n### Building\r\n\r\nRun from the CataclysmDDA directory:\r\n\r\n    PLATFORM=\"i686-w64-mingw32.static\"\r\n    make CROSS=\"~/src/mxe/usr/bin/${PLATFORM}-\" TILES=1 SOUND=1 LUA=1 RELEASE=1 LOCALIZE=1\r\n\r\nChange PLATFORM to x86_64-w64-mingw32.static for a 64-bit windows build.\r\n*****\r\n\r\nLet me know if you need more information from me."}}