On 06/09/2018 03:52 PM, Matthew R. Trower wrote:
Compiling with SunStudio12.3 (and possibly other versions) results in a
peculiar situation, as first documented here:
https://sourceforge.net/p/cdesktopenv/mailman/message/33004755/
Many generated Makefiles (example attached) contain lines like this:
---
msgsets.o: /opt/solarisstudio/prod/include/CC/Cstd/string
---
make proceeds to check up on those files, then tries to apply a generic
rule to them and compile them from the .cc file (!), which thankfully
fails miserably.
Three solutions come to mind:
1) touch the following files (the list may grow over time):
/opt/solarisstudio/prod/include/CC/Cstd/string
/opt/solarisstudio/prod/include/CC/Cstd/ios
/opt/solarisstudio/prod/include/CC/Cstd/ostream
/opt/solarisstudio/prod/include/CC/Cstd/istream
/opt/solarisstudio/prod/include/CC/Cstd/fstream
/opt/solarisstudio/prod/include/CC/Cstd/sstream
/opt/solarisstudio/prod/include/CC/Cstd/streambuf
/opt/solarisstudio/prod/include/CC/Cstd/rw/codecvt
/opt/solarisstudio/prod/include/CC/Cstd/rw/numeral
/opt/solarisstudio/prod/include/CC/Cstd/rw/locimpl
/opt/solarisstudio/prod/include/CC/Cstd/rw/iterator
/opt/solarisstudio/prod/include/CC/Cstd/rw/ctype
/opt/solarisstudio/prod/include/CC/Cstd/rw/rwlocale
either individually, or with this gnarly one-liner:
```
touch
/opt/solarisstudio/prod/include/CC/Cstd/{string,ios,{o,i,f,s}stream,streambuf,rw/{codecvt,numeral,locimpl,iterator,ctype,rwlocale}}
```
2) strip the offending lines from the generated Makefiles, after
generation and before kicking off the general `make`:
```
find . -name Makefile | \
xargs grep -l '.o:.*/opt/solarisstudio/prod/include/CC/' | \
xargs sed -i '/.o:.*\/opt\/solarisstudio\/prod\/include\/CC\//d'
```
3) Figure out what's broken with make (makedepend?) to begin with...
#1 works as a hack, but should be listed in the wiki if we want to go that
route.
#2 works as a hack, and can easily be inserted into the top-level Makefile.
#3 is probably correct, but requires some looking into.
Definitely go with #3.
Check sun.cf -- those paths are mentioned in there... Why? Are they
really necessary? What do they do?
Also, makedepend might be a problem as well. On Linux, and I think at
least one of the BSD's, we use gcc to generate the dependencies
(.depend) files, rather than using makedepend. I don't know if that's
feasible with the sun compiler or not - I have no experience with it.
Another alternative might be to use a makedepend that comes with the
system, if it's installed. It's is most likely a lot newer.
Might be simpler to just get gcc working :)
-jon
-- Matthew R. Trower
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel
--
Jon Trulson
"Fire all weapons and open a hailing frequency for my victory yodle."
- Zapp Brannigan
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel