{"action":"created","issue":{"url":"https://api.github.com/repos/openlink/virtuoso-opensource/issues/342","labels_url":"https://api.github.com/repos/openlink/virtuoso-opensource/issues/342/labels{/name}","comments_url":"https://api.github.com/repos/openlink/virtuoso-opensource/issues/342/comments","events_url":"https://api.github.com/repos/openlink/virtuoso-opensource/issues/342/events","html_url":"https://github.com/openlink/virtuoso-opensource/issues/342","id":57475840,"number":342,"title":"7.2.0 won't build in Ubuntu with openjdk-7-java: Directory specified with --with-jdk4 does not exist","user":{"login":"stain","id":253413,"avatar_url":"https://avatars.githubusercontent.com/u/253413?v=3","gravatar_id":"","url":"https://api.github.com/users/stain","html_url":"https://github.com/stain","followers_url":"https://api.github.com/users/stain/followers","following_url":"https://api.github.com/users/stain/following{/other_user}","gists_url":"https://api.github.com/users/stain/gists{/gist_id}","starred_url":"https://api.github.com/users/stain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stain/subscriptions","organizations_url":"https://api.github.com/users/stain/orgs","repos_url":"https://api.github.com/users/stain/repos","events_url":"https://api.github.com/users/stain/events{/privacy}","received_events_url":"https://api.github.com/users/stain/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-02-12T15:37:53Z","updated_at":"2015-05-05T22:49:01Z","closed_at":null,"body":"tl;dr: `dpkg-buildpackage` will not complain if `openjdk-7-java` is installed, and `openjdk-6-java` is missing, even though  `configure` falls over without jdk 6. It is not known why both jdk 6 and jdk7 are required.\r\n\r\nI started from scratch with the Ubuntu 14.04 x64 Docker image:\r\n\r\n    docker run -it ubuntu:14.04 bash\r\n\r\nAnd inside, to build 7.2.0, I did:\r\n\r\n    apt-get update\r\n    apt-get install -y unzip wget build-essential\r\n    cd /tmp\r\n    wget https://github.com/openlink/virtuoso-opensource/archive/stable/7.zip\r\n    unzip 7.zip\r\n    cd virtuoso-opensource-stable-7/\r\n    deps=$(dpkg-checkbuilddeps 2>&1 | sed 's/.*: //' | sed 's/([^)]*)//g')\r\n    #  cdbs debhelper quilt autotools-dev autoconf automake libtool flex bison gperf gawk m4 libssl-dev libreadline-dev zlib1g-dev libxml2-dev libpcre3-dev libldap2-dev mono-gmcs cli-common-dev libmono-corlib2.0-cil libmono-system-data2.0-cil libmono-system2.0-cil docbook2x po-debconf libmagickwand-dev java6-sdk java7-jdk\r\n    apt-get install -y $deps\r\n\r\nThis fails with\r\n\r\n```\r\nPackage java6-sdk is a virtual package provided by:\r\n  openjdk-6-jdk 6b34-1.13.6-1ubuntu0.14.04.1\r\n  openjdk-7-jdk 7u75-2.5.4-1~trusty1\r\n  default-jdk 2:1.7-51\r\nYou should explicitly select one to install.\r\n```\r\n\r\nSo I resolved this by doing the mistake of installing just `default-jdk` (e.g. `openjdk-7-jdk`) as I didn't understand why Virtuoso would want both. \r\n\r\n    apt-get install -y default-jdk\r\n\r\n\r\nNow I raise this bug, as it is likely that here are many Ubuntu 14.04 installations out there that have only `openjdk-7-jdk` (end of life April 2015!) and not the much older `openjdk-6-jdk` - and they won't get this warning as the dependency is \"satisfied\". \r\n\r\n`dpkg-checkbuilddeps` will now not list java6-sdk anymore:\r\n\r\n```\r\nroot@becde5ddfd94:/tmp/virtuoso-opensource-stable-7# dpkg-checkbuilddeps \r\ndpkg-checkbuilddeps: Unmet build dependencies: cdbs debhelper (>= 7) quilt autotools-dev autoconf (>= 2.57) automake (>= 1.10) libtool (>= 1.5.16) flex (>= 2.5.4) bison (>= 1.35) gperf (>= 2.7.2) gawk (>= 3.1.1) m4 (>= 1.4.1) libssl-dev (>= 0.9.7) libreadline-dev zlib1g-dev libxml2-dev libpcre3-dev libldap2-dev mono-gmcs (>= 1.0) cli-common-dev (>= 0.4.4) libmono-corlib2.0-cil (>= 1.2.6) libmono-system-data2.0-cil (>= 1.0) libmono-system2.0-cil (>= 1.2.6) docbook2x po-debconf libmagickwand-dev\r\n```\r\n\r\nbut building fails:\r\n\r\n    dpkg-buildpackage -us -uc\r\n\r\n```\r\n...\r\ndemo-vad --enable-tutorial-vad --enable-isparql-vad --enable-ods-vad --enable-rdfmappers-vad --enable-sparqldemo-vad --enable-syncml-vad --enable-bpel-vad --with-jdk4= --with-jdk4_1=/usr/lib/jvm/java-7-openjdk-amd64 \r\n...\r\nchecking for iODBC location... libsrc/odbcsdk\r\nchecking for Java options... done\r\nconfigure: error: \"Directory specified with --with-jdk4 does not exist\"\r\nmake: *** [debian/stamp-autotools] Error 1\r\ndpkg-buildpackage: error: debian/rules build gave error exit status 2\r\n```\r\n\r\nFor complete trace, see https://gist.github.com/stain/6ef8b2827d79dfabc460  \r\n\r\nAs you see `--with-jdk4=` (sic) is set to an empty string in the `configure` phase, while `--with-jdk4_1` has the correct jdk7 path.\r\n\r\nI then tried manually to install `openjdk-6-jdk` as well, and tried again. This time virtuoso builds correctly.\r\n\r\n    apt-get install -y openjdk-6-jdk\r\n    dpkg-buildpackage -us -uc\r\n\r\nI am not sure what the fix is (I would not suggest depending on `openjdk-6-jdk` as it is likely to disappear) - but I guess the configure line is what is broken here. Perhaps the first `--with-jdk4` should be dropped.\r\n"},"comment":{"url":"https://api.github.com/repos/openlink/virtuoso-opensource/issues/comments/99253602","html_url":"https://github.com/openlink/virtuoso-opensource/issues/342#issuecomment-99253602","issue_url":"https://api.github.com/repos/openlink/virtuoso-opensource/issues/342","id":99253602,"user":{"login":"openlink","id":84160,"avatar_url":"https://avatars.githubusercontent.com/u/84160?v=3","gravatar_id":"","url":"https://api.github.com/users/openlink","html_url":"https://github.com/openlink","followers_url":"https://api.github.com/users/openlink/followers","following_url":"https://api.github.com/users/openlink/following{/other_user}","gists_url":"https://api.github.com/users/openlink/gists{/gist_id}","starred_url":"https://api.github.com/users/openlink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openlink/subscriptions","organizations_url":"https://api.github.com/users/openlink/orgs","repos_url":"https://api.github.com/users/openlink/repos","events_url":"https://api.github.com/users/openlink/events{/privacy}","received_events_url":"https://api.github.com/users/openlink/received_events","type":"User","site_admin":false},"created_at":"2015-05-05T22:49:01Z","updated_at":"2015-05-05T22:49:01Z","body":"I pushed a fix for the make -j6 dependency issue building the JDBC drivers into the latest develop/7 tree.\r\n\r\n"}}