Re: How can I switch compiler from clang to gcc46?
I seem to have found the solution to the problem: lang/gcc needs to have symlinks in /usr/bin. Create these: # ln -s /usr/local/bin/gcc46 /usr/bin/gcc # ln -s /usr/local/bin/g++46 /usr/bin/g++ This way most, "gcc not found" errors should disappear. With many thanks to René Ladan -- View this message in context: http://freebsd.1045724.n5.nabble.com/How-can-I-switch-compiler-from-clang-to-gcc46-tp5796040p5798201.html Sent from the freebsd-ports mailing list archive at Nabble.com. ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"
Re: How can I switch compiler from clang to gcc46?
On 16 March 2013 16:33, Beeblebrox wrote: > Neither works, both give same fail: > make -USE_GCC=any > make -DUSE_GCC=any Don't use -D; Make options are not the same as cc. Try: make USE_GCC=any Chris ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"
Re: How can I switch compiler from clang to gcc46?
Neither works, both give same fail: make -USE_GCC=any make -DUSE_GCC=any -- View this message in context: http://freebsd.1045724.n5.nabble.com/How-can-I-switch-compiler-from-clang-to-gcc46-tp5796040p5796085.html Sent from the freebsd-ports mailing list archive at Nabble.com. ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"
Re: How can I switch compiler from clang to gcc46?
Sorry, not working - I know it normally would. make -DUSE_GCC=any Build dependency: Please install the GNU C Compiler (gcc). Build dependency: Please install the GNU C++ Compiler (g++). Build dependency: Please install ncurses. (Missing libncurses.so or ncurses.h) Build dependency: Please install zlib. (Missing libz.so or zlib.h) -- View this message in context: http://freebsd.1045724.n5.nabble.com/How-can-I-switch-compiler-from-clang-to-gcc46-tp5796040p5796083.html Sent from the freebsd-ports mailing list archive at Nabble.com. ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"
Re: How can I switch compiler from clang to gcc46?
On 16 March 2013 15:22, Beeblebrox wrote: > I just remembered: The last time I tried to compile this, I was on 9-STABLE > as I recall and I did not have any of the specific problems I am running > into now. Everything went much more smoothly back then. The way I've always used gcc to compile ports is to use the USE_GCC=any flag. Don't put that unconditionally in make.conf however, or you will break everything because of circular dependencies; either use something like: .if ${.CURDIR:M*/category/port} USE_GCC=any .endif or use it on the command line. Don't forget to make clean first. Chris ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"
Re: How can I switch compiler from clang to gcc46?
I just remembered: The last time I tried to compile this, I was on 9-STABLE as I recall and I did not have any of the specific problems I am running into now. Everything went much more smoothly back then. -- View this message in context: http://freebsd.1045724.n5.nabble.com/How-can-I-switch-compiler-from-clang-to-gcc46-tp5796040p5796071.html Sent from the freebsd-ports mailing list archive at Nabble.com. ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"
Re: How can I switch compiler from clang to gcc46?
@David: Ooops, forgot that bit. My shell also csh. Info for "un-modified" environment (no extra setenv or alias) uname -> 10.0-CURRENT #1 r248212, amd64 The extras you asked for: $which make -> /usr/bin/make $ make -V CC -> cc $ echo $CC -> CC: Undefined variable. $ setenv CC /usr/local/bin/gcc46 $ echo $CC -> /usr/local/bin/gcc46 $ make -V CC -> /usr/local/bin/gcc46 $ unsetenv CC $ echo $CC -> CC: Undefined variable. $ make -V CC -> cc $ make CC=/usr/local/bin/gcc46 -V CC -> /usr/local/bin/gcc46 Same output / results as yours... Regards. -- View this message in context: http://freebsd.1045724.n5.nabble.com/How-can-I-switch-compiler-from-clang-to-gcc46-tp5796040p5796069.html Sent from the freebsd-ports mailing list archive at Nabble.com. ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"
Re: How can I switch compiler from clang to gcc46?
Hi, On Sat, 16 Mar 2013 07:37:38 -0700 (PDT) Beeblebrox wrote: > @ Erich: The alias setting is the only thing that has worked so far > in shell environment - too bad it did no good for the Makefile's > dependents test (which is what I really want to get done). > this is also my experience. We use a different structure in our own make files. Ok, it is much more work to get them done. But - the big but here - they behave then as you would expect it. I got this idea with the alias once after I ran into the same problem as you. Erich ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"
Re: How can I switch compiler from clang to gcc46?
@ Erich: The alias setting is the only thing that has worked so far in shell environment - too bad it did no good for the Makefile's dependents test (which is what I really want to get done). Neither of these gave correct output at "cc -v" nor "CC -v" setenv CC /usr/local/bin/gcc46 setenv cc /usr/local/bin/gcc46 -- View this message in context: http://freebsd.1045724.n5.nabble.com/How-can-I-switch-compiler-from-clang-to-gcc46-tp5796040p5796066.html Sent from the freebsd-ports mailing list archive at Nabble.com. ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"
Re: How can I switch compiler from clang to gcc46?
If interested, OpenWRT build requirements: http://wiki.openwrt.org/doc/howto/buildroot.exigence My work so far: https://forum.openwrt.org/viewtopic.php?pid=194727#p194727 -- View this message in context: http://freebsd.1045724.n5.nabble.com/How-can-I-switch-compiler-from-clang-to-gcc46-tp5796040p5796064.html Sent from the freebsd-ports mailing list archive at Nabble.com. ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"
Re: How can I switch compiler from clang to gcc46?
Hi, I tried both "CC= /usr/local/bin/gcc46" and "export CC= /usr/local/bin/gcc46", but no good. Per request, enclosing the default Makefile; I'm trying to compile OpenWRT on native FreeBSD. https://docs.google.com/file/d/0Bxs_eepbMt6qV3Y3bDFtbnBUZFk/edit?usp=sharing The Makefile is unable to locate these either (but they are installed) Please install ncurses. (Missing libncurses.so or ncurses.h) Please install zlib. (Missing libz.so or zlib.h) from devel/ncurses-devel: /usr/local/include/ncurses/ncurses.h from archivers/lzlib: /usr/local/lib/compat/libz.so.4 Previously the compile broke at e2fsprogs and I wanted to test whether it has been fixed. OpenWRT is starting to support NetBSD compile environment, so the Makefile should be compatible... Source also has a BSDmakefile, with only this in it: world ${.TARGETS}: @gmake $@ Thanks and regards. -- View this message in context: http://freebsd.1045724.n5.nabble.com/How-can-I-switch-compiler-from-clang-to-gcc46-tp5796040p5796061.html Sent from the freebsd-ports mailing list archive at Nabble.com. ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"
Re: How can I switch compiler from clang to gcc46?
Hi, On Sat, 16 Mar 2013 10:04:41 -0400 Eitan Adler wrote: > On 16 March 2013 09:01, Beeblebrox wrote: > > I need to compile a source not in the ports tree. The source needs > > to use the gcc compiler (I have lang gcc (46) installed). Sourec > > make file complains it cannot find gcc46. > > > > To test, I placed in my environment: > > setenv CC gcc46 > > setenv CXX g++46 > > setenv CPP cpp46 > > > > When I do "cc -v" I still get clang output and not gcc46. What am I > > doing wrong here? > > cc is a program. If you want to use the environment variables try > using "$CC -v". If you want help to make your makefile to use $CC > instead of 'cc' you will need to provide the Makefile as an attachment > so we can see what it is doing. > why not set this as an alias? Of course, with the full path. Erich ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"
Re: How can I switch compiler from clang to gcc46?
On 16 March 2013 09:01, Beeblebrox wrote: > I need to compile a source not in the ports tree. The source needs to use the > gcc compiler (I have lang gcc (46) installed). Sourec make file complains it > cannot find gcc46. > > To test, I placed in my environment: > setenv CC gcc46 > setenv CXX g++46 > setenv CPP cpp46 > > When I do "cc -v" I still get clang output and not gcc46. What am I doing > wrong here? cc is a program. If you want to use the environment variables try using "$CC -v". If you want help to make your makefile to use $CC instead of 'cc' you will need to provide the Makefile as an attachment so we can see what it is doing. -- Eitan Adler ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"
Re: How can I switch compiler from clang to gcc46?
If you put these environment variables into make.conf ? Le 16/03/2013 13:53, Beeblebrox a écrit : > I changed env as proposed, to full path (path is correct, btw) > CC=/usr/local/bin/gcc46 > CXX=/usr/local/bin/g++46 > CPP=/usr/local/bin/cpp46 > I also placed same in the Makefile of 3rd party source. > >> you need to .. persuade your Makefile to run a different compiler. > That's exactly what I want to do, but I'm not getting there. > Any other ideas? Should I start tearing down $PATH? > > > > -- > View this message in context: > http://freebsd.1045724.n5.nabble.com/How-can-I-switch-compiler-from-clang-to-gcc46-tp5796040p5796052.html > Sent from the freebsd-ports mailing list archive at Nabble.com. > ___ > freebsd-ports@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-ports > To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org" > signature.asc Description: OpenPGP digital signature
Re: How can I switch compiler from clang to gcc46?
I changed env as proposed, to full path (path is correct, btw) CC=/usr/local/bin/gcc46 CXX=/usr/local/bin/g++46 CPP=/usr/local/bin/cpp46 I also placed same in the Makefile of 3rd party source. > you need to .. persuade your Makefile to run a different compiler. That's exactly what I want to do, but I'm not getting there. Any other ideas? Should I start tearing down $PATH? -- View this message in context: http://freebsd.1045724.n5.nabble.com/How-can-I-switch-compiler-from-clang-to-gcc46-tp5796040p5796052.html Sent from the freebsd-ports mailing list archive at Nabble.com. ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"
Re: How can I switch compiler from clang to gcc46?
On 16/03/2013 13:01, Beeblebrox wrote: > I need to compile a source not in the ports tree. The source needs to use the > gcc compiler (I have lang gcc (46) installed). Sourec make file complains it > cannot find gcc46. gcc46 will be /usr/local/bin/gcc46 -- it could be that /usr/local/bin isn't on the path that Makefile searches. > To test, I placed in my environment: > setenv CC gcc46 > setenv CXX g++46 > setenv CPP cpp46 Try using the fully qualified path in those settings: setenv CC /usr/local/bin/gcc46 setenv CXX /usr/local/bin/g++46 setenv CPP /usr/local/bin/cpp46 (Sanity check that -- I don't have gcc46 installed, so cannot confirm those are the correct paths.) > When I do "cc -v" I still get clang output and not gcc46. What am I doing > wrong here? Well, yes. What did you expect? Typing 'cc' at the shell prompt will almost certainly run /usr/bin/cc and that's going to be Clang on recent versions of FreeBSD. What you need to do is persuade your Makefile to run a different compiler, somewhere else in the filesystem. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. PGP: http://www.infracaninophile.co.uk/pgpkey JID: matt...@infracaninophile.co.uk signature.asc Description: OpenPGP digital signature
How can I switch compiler from clang to gcc46?
I need to compile a source not in the ports tree. The source needs to use the gcc compiler (I have lang gcc (46) installed). Sourec make file complains it cannot find gcc46. To test, I placed in my environment: setenv CC gcc46 setenv CXX g++46 setenv CPP cpp46 When I do "cc -v" I still get clang output and not gcc46. What am I doing wrong here? -- View this message in context: http://freebsd.1045724.n5.nabble.com/How-can-I-switch-compiler-from-clang-to-gcc46-tp5796040.html Sent from the freebsd-ports mailing list archive at Nabble.com. ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"