Skip to content

Fix libjpeg library finding and opencv build with nonstandard library directories (#8160)#8179

Merged
becker33 merged 3 commits intospack:developfrom
mcneish1:libjpeg-and-opencv-fixes
May 18, 2018
Merged

Fix libjpeg library finding and opencv build with nonstandard library directories (#8160)#8179
becker33 merged 3 commits intospack:developfrom
mcneish1:libjpeg-and-opencv-fixes

Conversation

@mcneish1
Copy link
Copy Markdown
Contributor

I'm a little concerned about the format(dso_suffix) removal as I have no way to test on osx.

Tested with +zlib+png+jpeg+tiff+jasper.

Copy link
Copy Markdown
Member

@adamjstewart adamjstewart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you confirm that this builds with all 5 of these variants enabled and post the output of ldd -r to confirm that it is actually linking to the Spack libraries and not the system libraries?

@@ -220,49 +220,48 @@ def cmake_args(self):
args.extend([
'-DZLIB_LIBRARY_{0}:FILEPATH={1}'.format((
'DEBUG' if '+debug' in spec else 'RELEASE'),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This package doesn't even have a +debug variant. It should be:

if 'build_type=Debug' in spec

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think this is resolved in 0a1f112. These were already in the opencv spec, I didn't think to actually check them, sorry about that.

@mcneish1
Copy link
Copy Markdown
Contributor Author

mcneish1 commented May 18, 2018

EDIT: this was with the build_type fix below

Installed opencv +core+imgproc+shared+zlib+png+jpeg+jasper+tiff~[everything else]. It produced:

  • libopencv_core.so
  • libopencv_imgcodecs.so
  • libopencv_imgproc.so
  • libopencv_objdetect.so
  • libopencv_photo.so
$ ldd -r libopencv_imgcodecs.so
linux-vdso64.so.1 =>  (0x0000100000000000)
        libopencv_imgproc.so.3.4 => /usr/workspace/wsa/mcneish1/spack-dev/opt/spack/linux-rhel7-ppc64le/gcc-4.9.3/opencv-3.4.1-wwj6xn7im2ymw7tbhinlbotphokixwcl/lib64/libopencv_imgproc.so.3.4 (0x00001000001d0000)
        libdl.so.2 => /lib64/libdl.so.2 (0x0000100000570000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00001000005a0000)
        librt.so.1 => /lib64/librt.so.1 (0x00001000005e0000)
->      libz.so.1 => /usr/workspace/wsa/mcneish1/spack-dev/opt/spack/linux-rhel7-ppc64le/gcc-4.9.3/zlib-1.2.11-5jgyzbl3pajltsw76ptogoawyfnudhkh/lib/libz.so.1 (0x0000100000610000)
->      libjpeg.so.62 => /usr/workspace/wsa/mcneish1/spack-dev/opt/spack/linux-rhel7-ppc64le/gcc-4.9.3/libjpeg-turbo-1.5.90-mym6vfhhk3maoglzb6pmmrr6jkdpsyhp/lib64/libjpeg.so.62 (0x0000100000650000)
->      libpng16.so.16 => /usr/workspace/wsa/mcneish1/spack-dev/opt/spack/linux-rhel7-ppc64le/gcc-4.9.3/libpng-1.6.34-oyosz6gkagyw6osmppp2uzsmdw5pqw23/lib/libpng16.so.16 (0x0000100000700000)
->      libtiff.so.5 => /usr/workspace/wsa/mcneish1/spack-dev/opt/spack/linux-rhel7-ppc64le/gcc-4.9.3/libtiff-4.0.8-eajlmud23zezcbtiahwqkud7jydueezm/lib/libtiff.so.5 (0x0000100000760000)
->      libjasper.so.1 => /usr/workspace/wsa/mcneish1/spack-dev/opt/spack/linux-rhel7-ppc64le/gcc-4.9.3/jasper-1.900.1-nuyqdc7e4kvswaoxenim5u3ew5o4ktz5/lib/libjasper.so.1 (0x0000100000800000)
        libopencv_core.so.3.4 => /usr/workspace/wsa/mcneish1/spack-dev/opt/spack/linux-rhel7-ppc64le/gcc-4.9.3/opencv-3.4.1-wwj6xn7im2ymw7tbhinlbotphokixwcl/lib64/libopencv_core.so.3.4 (0x0000100000880000)
        libstdc++.so.6 => /usr/tce/packages/gcc/gcc-4.9.3/gnu/lib64/libstdc++.so.6 (0x0000100000b50000)
        libm.so.6 => /lib64/libm.so.6 (0x0000100000cc0000)
        libgcc_s.so.1 => /usr/tce/packages/gcc/gcc-4.9.3/gnu/lib64/libgcc_s.so.1 (0x0000100000db0000)
        libc.so.6 => /lib64/libc.so.6 (0x0000100000df0000)
        /lib64/ld64.so.2 (0x0000000020000000)
        liblzma.so.5 => /usr/workspace/wsa/mcneish1/spack-dev/opt/spack/linux-rhel7-ppc64le/gcc-4.9.3/xz-5.2.3-juummrlqltu3vhsamztx2jh5ft4y2det/lib/liblzma.so.5 (0x0000100000fe0000

All of the others linked to the same libz, the spack one.

@becker33 becker33 merged commit f2eb71c into spack:develop May 18, 2018
@mcneish1 mcneish1 deleted the libjpeg-and-opencv-fixes branch May 18, 2018 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants