Trying to build a 32-bit app on kubuntu 18.04. I've got it to the point where I can use -m32 to compile my code in 32-bit mode, and am able to build a trivial app (once I installed multilibs). But now I'm trying to build an app that uses -lcurses, and ld is complaining about an incompatible X86-64 version of -ltinfo (which I assume is the 'terminfo' library - and is called in by my invoking the curses library). Specifically:
/usr/bin/ld: skipping incompatible //usr/lib/x86_64-linux-gnu/libtinfo.so when searching for -ltinfo
I've got cc -m32 on my final build line, and it's not complaining about any other libraries.
For what it's worth, if I go with the system defaults and allow my app to build as a 64-bit binary, everything builds - so I'm assuming I'm asking for all the right libraries, etc. It's just that the app doesn't work right as a 64-bit app, and before I go down the path of figuring out why that is, I thought I'd try to build it as a 32-bit app - which worked 20 years ago when I did my first 'proof of concept' linux build for this app ;-)
Is there some other way to invoke the 'ld' command to get the proper 32-bit libraries to load? Or do I have to install yet another 32-bit library package for -lcurses to work in 32-bit mode?