{"action":"created","issue":{"url":"https://api.github.com/repos/rordenlab/dcm2niix/issues/69","repository_url":"https://api.github.com/repos/rordenlab/dcm2niix","labels_url":"https://api.github.com/repos/rordenlab/dcm2niix/issues/69/labels{/name}","comments_url":"https://api.github.com/repos/rordenlab/dcm2niix/issues/69/comments","events_url":"https://api.github.com/repos/rordenlab/dcm2niix/issues/69/events","html_url":"https://github.com/rordenlab/dcm2niix/pull/69","id":196235116,"number":69,"title":"integration with the system zlib and libturbojpeg","user":{"login":"ghisvail","id":1964655,"avatar_url":"https://avatars.githubusercontent.com/u/1964655?v=3","gravatar_id":"","url":"https://api.github.com/users/ghisvail","html_url":"https://github.com/ghisvail","followers_url":"https://api.github.com/users/ghisvail/followers","following_url":"https://api.github.com/users/ghisvail/following{/other_user}","gists_url":"https://api.github.com/users/ghisvail/gists{/gist_id}","starred_url":"https://api.github.com/users/ghisvail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ghisvail/subscriptions","organizations_url":"https://api.github.com/users/ghisvail/orgs","repos_url":"https://api.github.com/users/ghisvail/repos","events_url":"https://api.github.com/users/ghisvail/events{/privacy}","received_events_url":"https://api.github.com/users/ghisvail/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-17T18:15:30Z","updated_at":"2016-12-17T22:15:29Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rordenlab/dcm2niix/pulls/69","html_url":"https://github.com/rordenlab/dcm2niix/pull/69","diff_url":"https://github.com/rordenlab/dcm2niix/pull/69.diff","patch_url":"https://github.com/rordenlab/dcm2niix/pull/69.patch"},"body":"This PR enables **optional** integration with the system zlib and libturbojpeg libraries, which is a desirable feature for Linux distributions such as Debian or Fedora.\r\n\r\nIt introduces 2 new options, `USE_SYSTEM_ZLIB` and `USE_SYSTEM_TURBOJPEG` to selectively enable compilation with either of the system libraries. They are set to `OFF` by default in order to keep the old behaviour.\r\n\r\nNo system libraries:\r\n```\r\ncmake .. && make\r\nldd ../bin/dcm2niix\r\n```\r\n```\r\n\tlinux-vdso.so.1 (0x00007ffe2477a000)\r\n\tlibm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fbd193c2000)\r\n\tlibc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fbd19024000)\r\n\t/lib64/ld-linux-x86-64.so.2 (0x000055f9a9efd000)\r\n```\r\n\r\nUse the system zlib:\r\n```\r\ncmake .. -DUSE_SYSTEM_ZLIB=ON && make\r\nldd ../bin/dcm2niix\r\n```\r\n```\r\n\tlinux-vdso.so.1 (0x00007ffd3fb1b000)\r\n\tlibz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fa79e481000)\r\n\tlibm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fa79e17d000)\r\n\tlibc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fa79dddf000)\r\n\t/lib64/ld-linux-x86-64.so.2 (0x0000561c3f7fa000)\r\n```\r\n\r\nUse the system zlib and libturbojpeg:\r\n```\r\ncmake .. -DUSE_SYSTEM_ZLIB=ON -DUSE_SYSTEM_TURBOJPEG=ON && make\r\nldd ../bin/dcm2niix\r\n```\r\n```\r\n\tlinux-vdso.so.1 (0x00007ffc04176000)\r\n\tlibz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f9ecf9f8000)\r\n\tlibturbojpeg.so.0 => /usr/lib/x86_64-linux-gnu/libturbojpeg.so.0 (0x00007f9ecf785000)\r\n\tlibm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f9ecf481000)\r\n\tlibc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f9ecf0e3000)\r\n\t/lib64/ld-linux-x86-64.so.2 (0x00005614c50ef000)\r\n```"},"comment":{"url":"https://api.github.com/repos/rordenlab/dcm2niix/issues/comments/267790612","html_url":"https://github.com/rordenlab/dcm2niix/pull/69#issuecomment-267790612","issue_url":"https://api.github.com/repos/rordenlab/dcm2niix/issues/69","id":267790612,"user":{"login":"neurolabusc","id":8930807,"avatar_url":"https://avatars.githubusercontent.com/u/8930807?v=3","gravatar_id":"","url":"https://api.github.com/users/neurolabusc","html_url":"https://github.com/neurolabusc","followers_url":"https://api.github.com/users/neurolabusc/followers","following_url":"https://api.github.com/users/neurolabusc/following{/other_user}","gists_url":"https://api.github.com/users/neurolabusc/gists{/gist_id}","starred_url":"https://api.github.com/users/neurolabusc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neurolabusc/subscriptions","organizations_url":"https://api.github.com/users/neurolabusc/orgs","repos_url":"https://api.github.com/users/neurolabusc/repos","events_url":"https://api.github.com/users/neurolabusc/events{/privacy}","received_events_url":"https://api.github.com/users/neurolabusc/received_events","type":"User","site_admin":false},"created_at":"2016-12-17T22:15:29Z","updated_at":"2016-12-17T22:15:29Z","body":"Ghislain-\r\n  The previous cmake automatically checked if zlib exists and would use it if it did. Your patch only uses this library if the user requests it. It seems the new code is more complex, as it requires the user to know what libraries exist and how to call cmake to enable it. It also will fail if the user runs \"cmake .. -DUSE_SYSTEM_ZLIB=ON && make\" on a system without zlib installed. With the old code, the advanced user can select between zlib and miniz using the `myDisableMiniZ` compiler directive as described by the readme.md, whereas cmake provides typical users with a sensible, automatic compilation. \r\n\r\nMy preference would be to have cmake automatically select zlib and turbo-jpeg if they exist, and fall back to the included miniz and nanoJPEG if they do not. That way \"cmake\" provides the optimal solution and just works."}}
{"actor":{"display_login":"neurolabusc"}}