amaneureka / AtomOS

A multitasking monolithic Kernel based x86 targeting Operating System written in C# from scratch aiming for high-level implementation of drivers in managed environment.
http://www.atomixos.com
BSD 3-Clause "New" or "Revised" License
1.26k stars 85 forks source link

[Build] Setup.sh --newlib fails when automake is above v1.12 #46

Closed aeleos closed 7 years ago

aeleos commented 7 years ago

Newlib will fail to build when automake is below version 1.12, when doing the autoreconf command it will fail with the error: configure.in:5: error: support for Cygnus-style trees has been removed Maybe have some kind of warning, as by default automake 1.14 is installed on ubuntu 14.04, and automake 1.15 is install on ubuntu 16.04. It can be fixed by removing the default package and installing the package automake1.1

amaneureka commented 7 years ago

Yes! a different version of automake and autoconf is required for building. try Setup.sh --setup It will build everything for you

aeleos commented 7 years ago

Setup.sh --setupSetup.sh --setup still fails, which was how I originally discovered the problem, but I eventually tracked down the problem to newlib failing to build.

aeleos commented 7 years ago

When I say still I mean with the wrong version of automake, both --setup and --newlib fail. It fixed the problem for me when I installed automake1.1 instead.

amaneureka commented 7 years ago

Setup.sh is building automake1.12 from source. then why you installed automake manually?

aeleos commented 7 years ago

It seems like during the newlib compilation on line 167 when it is running autoreconf it was using my system version instead of the compiled one.

amaneureka commented 7 years ago

Could you check manually which autoreconf just before line 167.

aeleos commented 7 years ago

Yep which autoreconf outputs /usr/bin/autoreconf

mananpal1997 commented 7 years ago

I'm facing the same issue, I think. Shall I remove all automake versions?

amaneureka commented 7 years ago

that's weird! here it is /cygdrive/f/dev/Atomix/src/Build/Local/bin/autoreconf try two things check if autoreconf exist in Build\Local\bin and this path exist in your PATH variable.

aeleos commented 7 years ago

Just running sudo apt-get remove automake and sudo apt-get install automake1.1 fixed it for me.

amaneureka commented 7 years ago

Just running sudo apt-get remove automake and sudo apt-get install automake1.1 fixed it for me.

I really not suggest this. This could break many other system libraries. that is why Setup.sh is building stuffs in different directory.

mananpal1997 commented 7 years ago

check if autoreconf exist in Build\Local\bin and this path exist in your PATH variable.

Its there in Build/Local/bin but doesn't exist in PATH variable

aeleos commented 7 years ago

Just checked it, autoreconf exists in Build\Local\bin and it is in my PATH directory. Maybe changing the name of the binary would help, maybe something similar to the i386-atomos that is infront of some of the other binaries.

amaneureka commented 7 years ago

Just checked it, autoreconf exists in Build\Local\bin ...

In case of conflicts. System always pick the first binary it encounter. Check Setup.sh It should read something like this export PATH=/usr/bin:$PREFIX/bin:$PATH line 10

Its there in Build/Local/bin but doesn't exist in PATH variable

Are you running it correctly?

aeleos commented 7 years ago

I wrote that it does exist in my PATH variable. /home/user/AtomOS/src/Build/Local/bin That was copy pasted from my path with my username removed.

aeleos commented 7 years ago

if the system picks the first binary it encounters, and in the export you have /usr/bin first, wouldn't that confirm that it will always use the system autoreconf and not the one in Build/Local/bin?

amaneureka commented 7 years ago

Fine. I didn't notice. I don't have system autoconf installed in that PATH so it never occurred to me. I'll make a fix commit. Thanks!

aeleos commented 7 years ago

No problem, happy to help.

amaneureka commented 7 years ago

@aeleos Can you please confirm if it is working now?

mananpal1997 commented 7 years ago

It's fixed now. @amaneureka