mistydemeo / tigerbrew

Experimental fork of homebrew for PPC Macs on Tiger
Other
545 stars 130 forks source link

Tuntap fails on 10.4.11 #173

Open ppcluddite opened 10 years ago

ppcluddite commented 10 years ago

Hi,

I was re-installing openvpn and tuntap is now a dependency, but the 20111101 version failed. According to tuntap's download page, that version dropped PPC support:

http://tuntaposx.sourceforge.net/download.xhtml

Here's the make log:

cd src/tap && make TUNTAP_VERSION=20111101 -f Makefile all g++ -Wall -mkernel -force_cpusubtype_ALL -fno-builtin -fno-stack-protector -arch i386 -arch x86_64 -DKERNEL -DAPPLE -DKERNEL_PRIVATE -DTUNTAP_VERSION=\"20111101\" -DTAP_KEXT_VERSION=\"20111101\" -I.. -I/System/Library/Frameworks/Kernel.framework/Headers -c ../tuntap.cc -o ../tuntap.o cc1plus: error: invalid option 'kernel' cc1plus: error: unrecognized command line option "-fno-stack-protector" cc1plus: error: invalid option 'kernel' cc1plus: error: unrecognized command line option "-fno-stack-protector" lipo: can't figure out the architecture type of: /var/tmp//ccJu6n1B.out make[1]: * [../tuntap.o] Error 1 make: * [tap.kext] Error 2

HOMEBREW_VERSION: 0.9.5 HEAD: 5a60d514dca61f0406883f4326fe034b0f93a8ba CPU: single-core 32-bit g4e OS X: 10.4.11-Power Macintosh Xcode: 2.5 X11: 1.1.3 => /usr/X11R6

mistydemeo commented 10 years ago

Can you brew update and try again? tuntap should now fetch the 20090913 release if you're running on PPC.

ppcluddite commented 10 years ago

I did 'brew update' and re-installed, and the make file gives a similar error:

cd src/tap && make TUNTAP_VERSION=20090913 -f Makefile all g++ -Wall -mkernel -force_cpusubtype_ALL -fno-builtin -fno-stack-protector -arch ppc -arch i386 -arch x86_64 -DKERNEL -DAPPLE -DKERNEL_PRIVATE -DTUNTAP_VERSION=\"20090913\" -DTAP_KEXT_VERSION=\"20090913\" -I.. -I/System/Library/Frameworks/Kernel.framework/Headers -c ../tuntap.cc -o ../tuntap.o cc1plus: error: invalid option 'kernel' cc1plus: error: unrecognized command line option "-fno-stack-protector" cc1plus: error: invalid option 'kernel' cc1plus: error: unrecognized command line option "-fno-stack-protector" cc1plus: error: invalid option 'kernel' cc1plus: error: unrecognized command line option "-fno-stack-protector" lipo: can't figure out the architecture type of: /var/tmp//ccKXrRNq.out make[1]: * [../tuntap.o] Error 1 make: * [tap.kext] Error 2

HOMEBREW_VERSION: 0.9.5 HEAD: a3e7186ea4efca241dd780883a5631c94af4f08b CPU: single-core 32-bit g4e OS X: 10.4.11-Power Macintosh Xcode: 2.5 X11: 1.1.3 => /usr/X11R6

mistydemeo commented 10 years ago

Can you provide the full build logs from ~/Library/Logs/Homebrew/tuntap, please?

mistydemeo commented 10 years ago

I see it's using g++, does it build with gcc-4.2?

mistydemeo commented 10 years ago

Oh, and brew --config.

theos911 commented 10 years ago

Did you get your Tiger machine back?

https://gist.github.com/theos911/9104529

mistydemeo commented 10 years ago

Yep, but she's at home. Will test later tonight, probably.

mistydemeo commented 10 years ago

Looks like the wrong compiler is being selected - you have 4.2, but it's choosing 4.0 over it.

theos911 commented 10 years ago

Anyway to force 4.2?

mistydemeo commented 10 years ago

Try passing --cc=gcc-4.2 as an argument.

mistydemeo commented 10 years ago

Ah, looks like the special-case code that used GCC 4.2 as the default on Tiger when installed went missing in a merge. Will reinstate.

theos911 commented 10 years ago

Does this mean a lot of stuff has been trying to build with 4.0?

mistydemeo commented 10 years ago

Yep. :(

theos911 commented 10 years ago

Double bad news...

Didn't work with 4.2 either. (Logs inbound)

mistydemeo commented 10 years ago

Pushed a fix, mind seeing if GCC 4.2 is picked up as the default now?

theos911 commented 10 years ago

On it.

theos911 commented 10 years ago

Yup, it picks up 4.2 now.

Still doesn't build (Logs inbound)

theos911 commented 10 years ago

The Pismo takes its good old time dredging up TenFourFox. ;)

https://gist.github.com/theos911/9104867

mistydemeo commented 10 years ago

Grr, it looks like tuntap's makefile is ignoring our CC and CXX environment variables, so it's using 4.0 anyway. Will look at dropping in a fix.

theos911 commented 10 years ago

What indicates that?

I see:

==> ENV
CC: /usr/local/bin/gcc-4.2 => /usr/local/Cellar/apple-gcc42/4.2.1-5553/bin/gcc-4.2
CXX: /usr/local/bin/g++-4.2 => /usr/local/Cellar/apple-gcc42/4.2.1-5553/bin/g++-4.2
OBJC: /usr/local/bin/gcc-4.2
OBJCXX: /usr/local/bin/g++-4.2
mistydemeo commented 10 years ago

Homebrew's variables set those, but tuntap is actually executing g++:

g++ -Wall -mkernel -force_cpusubtype_ALL -fno-builtin -fno-stack-protector -arch ppc -arch i386 -arch x86_64 -DKERNEL -D__APPLE__ -DKERNEL_PRIVATE -DTUNTAP_VERSION=\"20090913\" -DTAP_KEXT_VERSION=\"20090913\" -I.. -I/System/Library/Frameworks/Kernel.framework/Headers -c ../tuntap.cc -o ../tuntap.o
mistydemeo commented 10 years ago

(Someday in the far future 10.4 might get superenv, which would help with this stuff. I've been testing a backport to 10.5 and it's been quite successful so far.)

theos911 commented 10 years ago

Does g++ indicate 4.0? (If so, what indicates 4.2?) Superenv would effectively prevent the build from being aware of the 4.0?

mistydemeo commented 10 years ago

On 10.4, g++ is 4.0, yeah. g++-4.2 would be GCC 4.2, and that's what Homebrew tries to set.

Superenv wraps the compilers with shim scripts. Those have logic to ensure that the correct (from Homebrew's perspective) compiler is called, regardless of the name it's called under, among other things. E.g. if we're trying to use clang and a compiler calls gcc, the superenv wrapper calls the right tool anyway.

mistydemeo commented 10 years ago

Pushed a fix that forces the right compiler.

theos911 commented 10 years ago

https://gist.github.com/theos911/9111737

theos911 commented 10 years ago

Does that log contain what you need?

mistydemeo commented 10 years ago

It confuses me even more than before, so I'll try to poke at this on my 10.4.11/PPC laptop this weekend. Sorry!

theos911 commented 10 years ago

No worries. I don't use this software personally. I just wanted to make sure you had what you needed.

ppcluddite commented 10 years ago

Here's my make.log and brew --config if it helps, though it looks the same as theos911's:

https://gist.github.com/ppcluddite/9146908

My quixotic quest to have an openvpn server is probably just that--quixotic. No one would begrudge you if you lost track of this again ;-)

mistydemeo commented 10 years ago

I'm having absolutely no luck getting tuntap to build; I think it may still be compatible with 10.4, but may no longer build there. Probably going to turn the PPC distribution in Tigerbrew into a binary distribution that distributes the official prebuilt 10.4/PPC-compatible kernel extensions.