Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failure on Manjaro 64-bit #66

Open
ghost opened this issue Jul 26, 2016 · 11 comments
Open

Build failure on Manjaro 64-bit #66

ghost opened this issue Jul 26, 2016 · 11 comments

Comments

@ghost
Copy link

ghost commented Jul 26, 2016

When I try to build the sd mage I get the following error:

[kpapak@thelxiopi LiteBSD]$ sudo bmake kernel
bmake -Csys/compile all
bmake -C../../usr.sbin/config
bmake[2]: "/home/kpapak/LiteBSD/usr.sbin/config/Makefile" line 12: Could not find local.prog.mk
bmake[2]: Fatal errors encountered -- cannot continue
bmake[2]: stopped in /home/kpapak/LiteBSD/usr.sbin/config
*** Error code 1

Stop.
bmake[1]: stopped in /home/kpapak/LiteBSD/sys/compile
*** Error code 1

Stop.
bmake: stopped in /home/kpapak/LiteBSD
@majenkotech
Copy link
Collaborator

Why build with sudo? That can only break things.

Certain environment variables need to be set. If those aren't set (or they aren't getting through sudo) then you can expect it to fail.

@ghost
Copy link
Author

ghost commented Jul 28, 2016

I built again without sudo. Here is what I get.

[kpapak@parthenopi LiteBSD]$ bmake kernel
bmake -Csys/compile all
bmake -C../../usr.sbin/config
gcc  -o config config.o main.o lang.o mkioconf.o mkmakefile.o mkglue.o mkheaders.o mkswapconf.o -ll
/usr/bin/ld: cannot find -ll
collect2: error: ld returned 1 exit status
*** Error code 1

Stop.
bmake[2]: stopped in /home/kpapak/LiteBSD/usr.sbin/config
*** Error code 1

Stop.
bmake[1]: stopped in /home/kpapak/LiteBSD/sys/compile
*** Error code 1

Stop.
bmake: stopped in /home/kpapak/LiteBSD

@majenkotech
Copy link
Collaborator

Install libfl-dev (or whatever your mungeara equivalent is).

@wu-lei
Copy link

wu-lei commented Jan 29, 2018

macDeMacBook-Pro:LiteBSD mac$ bmake kernel
bmake -Csys/compile all
bmake -C../../usr.sbin/config
byacc -d config.y
bmake[2]: exec(byacc) failed (No such file or directory)
*** Error code 1

Stop.
bmake[2]: stopped in /Users/mac/LiteBSD/usr.sbin/config
*** Error code 1

Stop.
bmake[1]: stopped in /Users/mac/LiteBSD/sys/compile
*** Error code 1

Stop.
bmake: stopped in /Users/mac/LiteBSD
macDeMacBook-Pro:LiteBSD mac$

@majenkotech
Copy link
Collaborator

Install byacc?

@wu-lei
Copy link

wu-lei commented Jan 29, 2018

Yes, Thanks

@wu-lei
Copy link

wu-lei commented Jan 29, 2018

mkdep: error: unable to find utility "mkdep", not a developer tool or in PATH
*** Error code 72
Stop.
bmake[3]: stopped in /Users/mac/LiteBSD/sys/compile/SNADPIC.pic32
*** Error code 1

@majenkotech
Copy link
Collaborator

Install mkdep...?

To forestall future questions, if you get a "not found" like that first check to see if there is a package that provides it (with port or homebrew, whatever you use).

@wu-lei
Copy link

wu-lei commented Jan 30, 2018

Also produced some new error, from which one?

1748: #TODO: something wrong with nested interrupts
^ (107) illegal # directive "TODO" (warning)
'mips32r2' is not a recognized processor for this target (ignoring processor)
'mips32r2' is not a recognized processor for this target (ignoring processor)
../../mips/pic32/locore.s:3:16: error: unexpected token in '.set' directive
.set noreorder # Don't allow the assembler to reorder instructions.
...
...
../../mips/pic32/locore.s:1547:1: error: invalid instruction mnemonic 'lw'
lw $27, 0xffffc000+0+(34 * 4)
^~
../../mips/pic32/locore.s:1548:1: error: invalid instruction mnemonic 'mtc0'
mtc0 $27, $14 # Restore EPC.
^~~~
../../mips/pic32/locore.s:1549:1: error: invalid instruction mnemonic 'eret'
eret # Return from the interrupt.
^~~~
*** Error code 1
Stop.
bmake[3]: stopped in /Users/mac/LiteBSD/sys/compile/SNADPIC.pic32
*** Error code 1
Stop.
bmake[2]: stopped in /Users/mac/LiteBSD/sys/compile
*** Error code 1
Stop.
bmake[1]: stopped in /Users/mac/LiteBSD/sys/compile
*** Error code 1
Stop.
bmake: stopped in /Users/mac/LiteBSD

@majenkotech
Copy link
Collaborator

It sounds like you're not using the MIPS cross compiler. TBH I am not sure if compiling on MacOS works or not. I do all development (and in fact everything) on Linux.

@wu-lei
Copy link

wu-lei commented Jan 30, 2018

The problem is in $ export MIPS_GCC_ROOT = / usr / local / mips-2014.05.
Thank you very much majenkotech.
sh ../../conf/newvers.sh; /usr/local/mips-2014.05/bin/mips-elf-gcc -g -mips32r2 -EL -msoft-float -nostdinc -fno-builtin -Werror -Wall -O -I. -I../.. -DSNADPIC -DPIC32MZ -DCONS_MINOR=1 -DCONS_MAJOR=17 -DINET -DPROCFS -DFDESC -DKERNFS -DUNION -DFFS -DFIFO -DHZ=100 -DCPU_KHZ=200000 -DBUFPAGES=18 -DNBUF=18 -DNMBCLUSTERS=64 -DNKMEMCLUSTERS=64 -DDEBUG -DDIAGNOSTIC -DDEVPAGER -DVNODEPAGER -DSWAPPAGER -DBUTTON1_PORT=TRISD -DBUTTON1_PIN=15 -DBUTTON1_INVERT -DSD_LED_PORT=TRISF -DSD_LED_PIN=8 -DKERNEL -D_KERNEL -c vers.c; rm -f vmunix.elf
/usr/local/mips-2014.05/bin/mips-elf-gcc -mips32r2 -EL -nostdlib -T ../../mips/pic32/bare-mz.ld -Wl,-Map=vmunix.map -Wl,--oformat=elf32-littlemips ${SYSTEM_OBJ} vers.o -L../../libkern -lkern -o vmunix.elf
/usr/local/mips-2014.05/bin/mips-elf-size vmunix.elf; /usr/local/mips-2014.05/bin/mips-elf-objcopy -O ihex --change-addresses=0x80000000 vmunix.elf vmunix.hex; /usr/local/mips-2014.05/bin/mips-elf-objdump -d -S vmunix.elf > vmunix.dis
text data bss dec hex filename
496148 14360 17872 528380 80ffc vmunix.elf
macDeMacBook-Pro:LiteBSD mac$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants