{"id":682,"date":"2017-02-23T09:36:57","date_gmt":"2017-02-23T08:36:57","guid":{"rendered":"https:\/\/www.dereckson.be\/blog\/?p=682"},"modified":"2017-10-07T09:46:55","modified_gmt":"2017-10-07T07:46:55","slug":"find-tcl-headers-and-libraries-in-debian-and-freebsd","status":"publish","type":"post","link":"https:\/\/www.dereckson.be\/blog\/2017\/02\/23\/find-tcl-headers-and-libraries-in-debian-and-freebsd\/","title":{"rendered":"Find TCL headers and libraries in Debian and FreeBSD"},"content":{"rendered":"<p><strong>Problem.<\/strong> You want to compile a software against TCL. You run .\/configure, but it can&#8217;t find it. You so need to locate where are the headers and the libraries.<\/p>\n<p><strong>Solution.<\/strong><\/p>\n<p>Start with the TCL version.<\/p>\n<p>On Debian:<\/p>\n<ul>\n<li>headers are in a subdirectory in \/usr\/include, named tcl followed by the version<\/li>\n<li>libraries are sorted by architecture, <code>dpkg-architecture<\/code> can give the right one.<\/li>\n<\/ul>\n<p>On FreeBSD:<\/p>\n<ul>\n<li>headers are also in a subdirectory in \/usr\/local\/include, also named tcl followed by the version<\/li>\n<li>libraries are in \/usr\/local\/lib at expected place, but named by the version without any dot (e.g. libtcl86 for TCL 8.6).<\/li>\n<\/ul>\n<p>Here a sample from a build script we use on Eglide:<\/p>\n<pre class=\"lang:sh decode:true\">TCL_VERSION=8.6\r\n\r\n#   -------------------------------------------------------------\r\n#   Configure step\r\n#\r\n#   This is the tricky part, as we need to provide path to TCL\r\n#   header and library files, heavily OS\/distro\/arch dependant.\r\n#   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\r\n\r\nif [ -f \/etc\/debian_version ]; then\r\n    ARCH=`dpkg-architecture -qDEB_HOST_MULTIARCH`\r\n    .\/configure --with-tclinc=\/usr\/include\/tcl${TCL_VERSION}\/tcl.h --with-tcllib=\/usr\/lib\/$ARCH\/libtcl${TCL_VERSION}.so --with-tcl=\/usr\/lib\/$ARCH\/tcl${TCL_VERSION}\r\nelif [ `uname` = \"FreeBSD\" ]; then\r\n    TCL_VERSION_LIB=`echo $TCL_VERSION | tr -d .`\r\n    .\/configure --with-tclinc=\/usr\/local\/include\/tcl${TCL_VERSION}\/tcl.h -with-tcllib=\/usr\/local\/lib\/libtcl${TCL_VERSION_LIB}.so --with-tcl=\/usr\/local\/lib\/tcl${TCL_VERSION}\r\nelse\r\n    .\/configure\r\nfi\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Problem. You want to compile a software against TCL. You run .\/configure, but it can&#8217;t find it. You so need to locate where are the headers and the libraries. Solution. Start with the TCL version. On Debian: headers are in a subdirectory in \/usr\/include, named tcl followed by the version libraries are sorted by architecture, [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[49,50],"tags":[202,9,20],"class_list":["post-682","post","type-post","status-publish","format-standard","hentry","category-dev","category-sysadmin","tag-debian","tag-freebsd","tag-tcl"],"_links":{"self":[{"href":"https:\/\/www.dereckson.be\/blog\/wp-json\/wp\/v2\/posts\/682","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dereckson.be\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dereckson.be\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dereckson.be\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dereckson.be\/blog\/wp-json\/wp\/v2\/comments?post=682"}],"version-history":[{"count":1,"href":"https:\/\/www.dereckson.be\/blog\/wp-json\/wp\/v2\/posts\/682\/revisions"}],"predecessor-version":[{"id":683,"href":"https:\/\/www.dereckson.be\/blog\/wp-json\/wp\/v2\/posts\/682\/revisions\/683"}],"wp:attachment":[{"href":"https:\/\/www.dereckson.be\/blog\/wp-json\/wp\/v2\/media?parent=682"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dereckson.be\/blog\/wp-json\/wp\/v2\/categories?post=682"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dereckson.be\/blog\/wp-json\/wp\/v2\/tags?post=682"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}