2

I tried to use pdftk command to handle different pdf files.

But unfortunaltely, it doesn't work. There seems that libstdc++.6.dylib is missing into MacOS Big Sur 11.2.3.

Here an example of command tried (extract the 4th page) :

$ pdftk example1.pdf cat 4 output example2.pdf
dyld: Symbol not found: __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev
  Referenced from: /usr/local/bin/pdftk
  Expected in: /usr/lib/libstdc++.6.dylib
 in /usr/local/bin/pdftk
zsh: abort      pdftk example1.pdf cat 4 output

How can I solve this issue ?

If I do a ls -l into /usr_lib/libstdc++*, I get :

$ ls -l /usr/lib/libstdc++.*
lrwxr-xr-x 1 root 17 Jan  1  2020 /usr/lib/libstdc++.dylib -> libstdc++.6.dylib
lrwxr-xr-x 1 root 21 Jan  1  2020 /usr/lib/libstdc++.6.dylib -> libstdc++.6.0.9.dylib

and file libstdc++.6.0.9.dylib is missing : is it normal ?

Both macports and brew fail to install pdftk.

  • Does this answer your question? [How do I completely remove (all versions of) pdftk server from Mac OS X?](https://stackoverflow.com/questions/34289231/how-do-i-completely-remove-all-versions-of-pdftk-server-from-mac-os-x) – samcarter_is_at_topanswers.xyz Sep 13 '21 at 12:52

1 Answers1

1

__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev is the mangled name for

std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()

That's definitely a libstdc++ thing; libc++ doesn't have a namespace __cxx11.

Apple has not shipped libstdc++ on Mac OS for a long time (several releases). They use libc++ instead.

I wonder why the Mac version of pdftk wants libstdc++

Marshall Clow
  • 15,972
  • 2
  • 29
  • 45
  • 2
    Thanks for your quick answer. How could I circumvent this missing library, I can't copy the file into /usr/lib since `csr SIP` protection enabled ? –  Apr 06 '21 at 07:54