0

I recently migrated a number of websites from a server running RHEL 6 to one running RHEL 7. One site uses pdftk, which has a dependency on libgcj, which is apparently no longer supported under RHEL 7. (At least, I have not found a repo advertising it.) It seems that libgcj is required to compile pdftk from source.

I still have access to the old server. It has a compiled binary of pdftk. Is it possible I could just copy that over to the new RHEL 7 server, even though it was compiled in RHEL 6? What would the risks be of testing this theory out? (i.e. can I damage anything trying this?)

Dave W.
  • 98
  • 6

1 Answers1

2

So long as you are using the same architecture and not going from a 64bit server to a 32bit server this should work.

You may need to fulfill some library dependencies. Indeed a quick Google seems to imply that libgcj is needed and no longer is available in RHEL7.

There is very little that can go wrong and you probably won't damage your system. Worse case scenario is, you'll get an error saying a library is missing or its the wrong architecture.

AndyMcCall
  • 46
  • 1
  • Well, actually, all kinds of things can go wrong. The executable may have built in version checks for any of the libraries it uses. Function calls may have changed, both in name and number of parameters. Your assertion is overly optimistic, things can go OK, but they surely don't have to. – tink Sep 22 '17 at 18:03
  • As far as I can tell, libgcj is only used to compile pdftk from source. It wil never be called at runtime, unless my understanding is wrong. – Dave W. Sep 22 '17 at 18:13
  • I was referring to things like, the root partition being deleted or the building that the server is in setting on fire. A platform check or a missing library isn't a something that will damage the system, but yes they may happen. – AndyMcCall Sep 22 '17 at 18:13
  • Will mark this as an answer, but if the earth explodes the first time I run pdftk on my rhel7 server I will expect an apology, Andy. – Dave W. Sep 22 '17 at 18:17
  • OK, turns out I was wrong and it checks for libgcj, so it won't run. Are there significant risks to installing the RHEL 6 version of libgcj on my RHEL7 server? – Dave W. Sep 22 '17 at 18:29
  • Copied compiled libgcj.so file over, put it where pdftk wants it, now it runs without outputting errors but does not actually work...back to the drawing board. – Dave W. Sep 22 '17 at 18:42
  • I suspected that would be the case. I think you are probably going to have to get the source, fulfill the source dependencies and then compile it yourself. – AndyMcCall Sep 22 '17 at 18:47