The current installation of openjpeg-devel has a broken pkgconfig file.
pkg-config --libs libopenjp2 produces -L/usr//usr/lib64 -lopenjp2, which causes the link to libopenjp2 broken in building software.
The issue is that one should only specify a relative library path to the install prefix rather than an absolute path.
After the fix, the output of pkg-config --libs libopenjp2 is -lopenjp2.