charmc option "-ld" to specify linker conflicts with passing "-ld" to link libd.so
Any program that uses dlopen() will need to link with libd.so by passing `-ld` to the linker. However, charmc has options "-ld" and "-ld++" for overriding $CMK_LD and $CMK_LDXX respectively.
I can only recommend removing charmc's -ld and -ld++ options, or renaming them to something else. Maybe -override-ld and -override-ld++.