{"id":10073,"date":"2025-06-16T22:58:40","date_gmt":"2025-06-16T20:58:40","guid":{"rendered":"https:\/\/michlstechblog.info\/blog\/?p=10073"},"modified":"2025-06-18T10:03:38","modified_gmt":"2025-06-18T08:03:38","slug":"unbound-build-cross-compile-on-fedora-it-for-windows","status":"publish","type":"post","link":"https:\/\/michlstechblog.info\/blog\/unbound-build-cross-compile-on-fedora-it-for-windows\/","title":{"rendered":"Unbound:  Build (Cross compile on Fedora) it  for Windows"},"content":{"rendered":"<div class=\"twoclick_social_bookmarks_post_10073 social_share_privacy clearfix 1.6.4 locale-en_US sprite-en_US\"><\/div><div class=\"twoclick-js\"><script type=\"text\/javascript\">\/* <![CDATA[ *\/\njQuery(document).ready(function($){if($('.twoclick_social_bookmarks_post_10073')){$('.twoclick_social_bookmarks_post_10073').socialSharePrivacy({\"services\":{\"flattr\":{\"uid\":\"Michl\",\"status\":\"on\",\"the_title\":\"Unbound%3A%20%20Build%20%28Cross%20compile%20on%20Fedora%29%20it%20%20for%20Windows\",\"the_excerpt\":\"Hi%2C%0D%0A%0D%0Ahere%20are%20the%20steps%20to%20cross%20compile%20the%20Windows%20executables%20for%20unbound%20from%20source%20on%20%28Fedora%2042%29%20linux.%0D%0A%20%28more%26hellip%3B%29\",\"txt_info\":\"2 clicks for more data protection:\\r\\n\\r\\nOnly when you click here, the button will be come active and you can send your recommendation to Flattr. When activating, data are transmitted to third parties. \",\"perma_option\":\"off\"}},\"txt_help\":\"When you activate these fields by clicking, information to Flattr may be transferred abroad, and probably may also stored there.\",\"settings_perma\":\"Enable permanently and accept data transmission. \",\"info_link\":\"http:\\\/\\\/www.heise.de\\\/ct\\\/artikel\\\/2-Klicks-fuer-mehr-Datenschutz-1333879.html\",\"uri\":\"https:\\\/\\\/michlstechblog.info\\\/blog\\\/unbound-build-cross-compile-on-fedora-it-for-windows\\\/\",\"post_id\":10073,\"post_title_referrer_track\":\"Unbound%3A++Build+%28Cross+compile+on+Fedora%29+it++for+Windows\",\"display_infobox\":\"on\"});}});\n\/* ]]> *\/<\/script><\/div><p>Hi,<\/p>\n<p>here are the steps to cross compile the Windows executables for unbound from source on (Fedora 42) linux.<br \/>\n<!--more--><\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nmichael@feddev ~ # sudo dnf install mingw32-binutils mingw32-cpp mingw32-filesystem mingw32-gcc mingw32-openssl mingw32-openssl-static zip mingw32-termcap mingw32-zlib mingw32-zlib-static mingw32-nsis perl-FindBin perl-IPC-Cmd perl-File-Compare perl-File-Copy make mingw-w64-tools\r\nmichael@feddev ~ # sudo dnf install mingw64-binutils mingw64-cpp mingw64-filesystem mingw64-gcc mingw64-openssl mingw64-openssl-static mingw64-termcap mingw64-zlib mingw64-zlib-static mingw64-nsis \r\nmichael@feddev ~ # sudo dnf install @development-tools @Development-Libraries gcc-c++ mingw32-gcc-c++ mingw64-gcc-c++\r\nmichael@feddev ~ # sudo dnf install git\r\nmichael@feddev ~ # mkdir unbound-build\r\nmichael@feddev ~ # mkdir $HOME\/ubound\/\r\nmichael@feddev ~ # cd unbound-build\r\nmichael@feddev ~\/unbound-build # git clone https:\/\/github.com\/NLnetLabs\/unbound unbound-git \r\nmichael@feddev ~\/unbound-build # cd unbound-git\r\nmichael@feddev ~\/unbound-build\/unbound-git # wget https:\/\/github.com\/libexpat\/libexpat\/releases\/download\/R_2_7_1\/expat-2.7.1.tar.bz2 -O $HOME\/unbound-build\/expat-2.7.1.tar.bz2 \r\nmichael@feddev ~\/unbound-build\/unbound-git # wget https:\/\/github.com\/openssl\/openssl\/releases\/download\/openssl-3.5.0\/openssl-3.5.0.tar.gz -O $HOME\/unbound-build\/openssl-3.5.0.tar.gz\r\nmichael@feddev ~\/unbound-build\/unbound-git # .\/makedist.sh  -wssl $HOME\/unbound-build\/openssl-3.5.0.tar.gz -wxp $HOME\/unbound-build\/expat-2.7.1.tar.bz2  -wdir $HOME\/ubound -w --enable-staticexe\r\ntest of unbound-1.23.1.zip OK\r\n.\/makedist.sh: info: Creating installer\r\nProcessing config: \/etc\/nsisconf.nsh\r\nProcessing script file: &quot;..\/winrc\/setup_ed.nsi&quot; (UTF8)\r\n\r\nProcessed 1 file, writing output (x86-unicode):\r\n\r\nOutput: &quot;unbound_setup_1.23.1.exe&quot;\r\nInstall: 7 pages (448 bytes), 3 sections (2 required) (98376 bytes), 526 instructions (14728 bytes), 278 strings (13470 bytes), 1 language table (378 bytes).\r\nUninstall: 4 pages (320 bytes), 1 section (32792 bytes), 388 instructions (10864 bytes), 194 strings (6068 bytes), 1 language table (286 bytes).\r\nDatablock optimizer saved 3348 bytes (~0.0%).\r\n\r\nUsing zlib compression.\r\n\r\nEXE header size:              137728 \/ 110080 bytes\r\nInstall code:                   6941 \/ 78712 bytes\r\nInstall data:               27963923 \/ 69753226 bytes\r\nUninstall code+data:           46237 \/ 59345 bytes\r\nCRC (0x2CE5D4E2):                  4 \/ 4 bytes\r\n\r\nTotal size:                 28154833 \/ 70001367 bytes (40.2%)\r\n.\/makedist.sh: info: Created installer\r\n.\/makedist.sh: info: Deleting temporary working directory.\r\nhash of unbound_setup_1.23.1.exe.{sha1,sha256}\r\nsha1 f078d28f8fa3554576fc04a4bfeda03e420f914c\r\nsha256 ce9e1597107ee52e8a260a869a1ad2a5b54d3fc77f1c34970ddeec4fb7f6a48b\r\nhash of unbound-1.23.1.zip.{sha1,sha256}\r\nsha1 e53e337de088f15ad7e190007a64f87d90cf1055\r\nsha256 f642d1c198d101df85e607d45ee95be6334622f0762cc1c518e72837e6aa4f87\r\n-rw-r--r--. 1 michael 28154833 17. Jun 20:53 unbound_setup_1.23.1.exe\r\n-rw-r--r--. 1 michael 31763950 17. Jun 20:53 unbound-1.23.1.zip\r\ncreate signed versions with:\r\n  gpg --armor --detach-sign --digest-algo SHA256 unbound_setup_1.23.1.exe\r\n  gpg --armor --detach-sign --digest-algo SHA256 unbound-1.23.1.zip\r\n.\/makedist.sh: info: Done\r\n\r\n\r\n<\/pre>\n<p>Michael<\/p>\n<p><!-- https:\/\/stackoverflow.com\/questions\/15986715\/how-do-i-invoke-the-mingw-cross-compiler-on-linux --><\/p>\n<p><!-- Debian not working without xxxx adjustments....\nInstall mingw and required libs.\n[shell]\nmichael@debdev ~ # sudo apt install mingw-w64 mingw-w64-i686-dev mingw-w64-tools mingw-w64-x86-64-dev win-iconv-mingw-w64-dev libgcrypt-mingw-w64-dev libexpat-dev libssl-dev unzip nsis\n[\/shell]\n\nGet sources and compile (x64 binaries)\n[shell]\nmkdir libexpat\ncd libexpat\nunzip expat-win32bin-2.7.1.zip\n\n[\/shell]\n[shell]\nmichael@debdev ~ # mkdir unbound-build\nmichael@debdev ~ # cd unbound-build\nmichael@debdev ~\/unbound-build # git clone https:\/\/github.com\/NLnetLabs\/unbound unbound-git \nmichael@debdev ~\/unbound-build # cd unbound-git\nmichael@debdev ~\/unbound-build\/unbound-git # mkdir $HOME\/ubound\/\nmichael@debdev ~\/unbound-build\/unbound-git # mkdir $HOME\/ubound\/openssl_shared\nmichael@debdev ~\/unbound-build\/unbound-git # wget https:\/\/github.com\/libexpat\/libexpat\/releases\/download\/R_2_7_1\/expat-2.7.1.tar.bz2 -O $HOME\/unbound-build\/expat-2.7.1.tar.bz2 \nmichael@debdev ~\/unbound-build\/unbound-git # wget https:\/\/github.com\/openssl\/openssl\/releases\/download\/openssl-3.5.0\/openssl-3.5.0.tar.gz -O $HOME\/unbound-build\/openssl-3.5.0.tar.gz\nmichael@debdev ~\/unbound-build\/unbound-git # .\/makedist.sh  -wssl $HOME\/unbound-build\/openssl-3.5.0.tar.gz -wxp $HOME\/unbound-build\/expat-2.7.1.tar.bz2  -wdir $HOME\/ubound -w\n# michael@debdev ~\/unbound-build\/unbound-git # .\/configure --host=x86_64-w64-mingw32 --prefix=\/usr\/x86_64-w64-mingw32 --enable-staticexe\n# michael@debdev ~\/unbound-build\/unbound-git # .\/configure --host=i686-w64-mingw32 --enable-staticexe\n[\/shell]\n--><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi, here are the steps to cross compile the Windows executables for unbound from source on (Fedora 42) linux.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2089],"tags":[],"class_list":["post-10073","post","type-post","status-publish","format-standard","hentry","category-unbound"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/10073","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/comments?post=10073"}],"version-history":[{"count":26,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/10073\/revisions"}],"predecessor-version":[{"id":10100,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/10073\/revisions\/10100"}],"wp:attachment":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/media?parent=10073"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/categories?post=10073"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/tags?post=10073"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}