Comments (15)
That is because you did not have the necessary compiler installed. I have added a README and INSTALL instructions. Let me know if you need any assistance.
from pokeruby.
thanks for the help! unfortunately even with the install instructions it seems like something goes wrong in the middle. i got up to successfully using build.sh, but install.sh seems to reference a file called libgcc.a that doesn't actually exist in agbcc -
"cp: cannot stat ‘libgcc/libgcc.a’: No such file or directory"
any idea where this might be?
from pokeruby.
build.sh is supposed to create that file. What does build.sh output? Could you put it on pastebin or something?
from pokeruby.
or here
from pokeruby.
here you are! it's a doozy
from pokeruby.
It looks like there was an error building libgcc.a, but it isn't shown.
Could you run these commands in the "agbcc" directory?
make -C gcc clean
make -C gcc old
Then:
cd libgcc
make clean
make
You should see an error at the end of the output.
from pokeruby.
at make, i get:
rm -f tmplibgcc1.a
set -e
for name in _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_tls _call_via_rX;
do
echo ${name};
cpp -DL${name} -x assembler-with-cpp -o ${name}.s lib1thumb.asm;
echo -e ".text\n\t.align\t2, 0\n" >> ${name}.s ;
/home/student/devkitPro/devkitARM/bin/arm-none-eabi-as -mcpu=arm7tdmi -o ${name}.o ${name}.s;
rm -f ${name}.s;
ar -rc tmplibgcc1.a ${name}.o;
rm -f ${name}.o;
done
_udivsi3
lib1thumb.asm: Assembler messages:
lib1thumb.asm:148: Error: junk at end of line, first unrecognized character is -' ar: _udivsi3.o: No such file or directory _divsi3 lib1thumb.asm: Assembler messages: lib1thumb.asm:418: Error: junk at end of line, first unrecognized character is
-'
ar: _divsi3.o: No such file or directory
_umodsi3
lib1thumb.asm: Assembler messages:
lib1thumb.asm:299: Error: junk at end of line, first unrecognized character is -' ar: _umodsi3.o: No such file or directory _modsi3 lib1thumb.asm: Assembler messages: lib1thumb.asm:578: Error: junk at end of line, first unrecognized character is
-'
ar: _modsi3.o: No such file or directory
_dvmd_tls
lib1thumb.asm: Assembler messages:
lib1thumb.asm:591: Error: junk at end of line, first unrecognized character is -' ar: _dvmd_tls.o: No such file or directory _call_via_rX lib1thumb.asm: Assembler messages: lib1thumb.asm:632: Error: junk at end of line, first unrecognized character is
-'
ar: _call_via_rX.o: No such file or directory
mv tmplibgcc1.a libgcc1.a
mv: cannot stat ‘tmplibgcc1.a’: No such file or directory
make: *** [libgcc1.a] Error 1
it seems as if there are some characters the assembler doesn't like?
from pokeruby.
Those errors are always after SIZE(...) in the asm file. SIZE(x) is replaced with ".size SYM(x), . - SYM(x)". Since the error is complaining about "-", it looks like the SYM(x) is being replaced with an empty string. This produces ".size , . -" which is an error. I don't know why that would happen though. If you type "cpp --version", what version is printed?
from pokeruby.
cpp (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
from pokeruby.
That is a slightly old version but it should work. What is the output of this command (in the libgcc directory)?
cpp -DL_udivsi3 -x assembler-with-cpp lib1thumb.asm
Is it different from this?
cpp -DL_udivsi3 lib1thumb.asm
from pokeruby.
they print the exact same thing:
# 1 "lib1thumb.asm"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 1 "<command-line>" 2
# 1 "lib1thumb.asm"
@ libgcc1 routines for ARM cpu.
@ Division routines, written by Richard Earnshaw, ([email protected])
# 36 "lib1thumb.asm"
.code 16
# 45 "lib1thumb.asm"
work .req r4 @ XXXX is this safe ?
dividend .req r0
divisor .req r1
result .req r2
curbit .req r3
.text
.globl __udivsi3
.type __udivsi3,function
.align 2, 0
.thumb_func
__udivsi3:
cmp divisor, #0
beq Ldiv0
mov curbit, #1
mov result, #0
push { work }
cmp dividend, divisor
bcc Lgot_result
@ Load the constant 0x10000000 into our work register
mov work, #1
lsl work, #28
Loop1:
@ Unless the divisor is very big, shift it up in multiples of
@ four bits, since this is the amount of unwinding in the main
@ division loop. Continue shifting until the divisor is
@ larger than the dividend.
cmp divisor, work
bcs Lbignum
cmp divisor, dividend
bcs Lbignum
lsl divisor, #4
lsl curbit, #4
b Loop1
Lbignum:
@ Set work to 0x80000000
lsl work, #3
Loop2:
@ For very big divisors, we must shift it a bit at a time, or
@ we will be in danger of overflowing.
cmp divisor, work
bcs Loop3
cmp divisor, dividend
bcs Loop3
lsl divisor, #1
lsl curbit, #1
b Loop2
Loop3:
@ Test for possible subtractions, and note which bits
@ are done in the result. On the final pass, this may subtract
@ too much from the dividend, but the result will be ok, since the
@ "bit" will have been shifted out at the bottom.
cmp dividend, divisor
bcc Over1
sub dividend, dividend, divisor
orr result, result, curbit
Over1:
lsr work, divisor, #1
cmp dividend, work
bcc Over2
sub dividend, dividend, work
lsr work, curbit, #1
orr result, work
Over2:
lsr work, divisor, #2
cmp dividend, work
bcc Over3
sub dividend, dividend, work
lsr work, curbit, #2
orr result, work
Over3:
lsr work, divisor, #3
cmp dividend, work
bcc Over4
sub dividend, dividend, work
lsr work, curbit, #3
orr result, work
Over4:
cmp dividend, #0 @ Early termination?
beq Lgot_result
lsr curbit, #4 @ No, any more bits to do?
beq Lgot_result
lsr divisor, #4
b Loop3
Lgot_result:
mov r0, result
pop { work }
mov pc, lr
Ldiv0:
push { lr }
bl __div0
mov r0, #0 @ about as wrong as it could be
pop { pc }
.size __udivsi3, . - __udivsi3
from pokeruby.
Does this change anything?
cpp -nostdinc -undef -DL_udivsi3 lib1thumb.asm
from pokeruby.
that doesn't write
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 1 "<command-line>" 2
but the rest is the same. didn't seem to change anything about the make working either.
from pokeruby.
Your output doesn't appear to be any different from what I see on my Linux VM. If you output that to a file and try to assemble it, do you still see the errors?
cpp -nostdinc -undef -DL_udivsi3 lib1thumb.asm >_udivsi3.s
$DEVKITARM/bin/arm-none-eabi-as -mcpu=arm7tdmi _udivsi3.s
from pokeruby.
This should be fixed now.
from pokeruby.
Related Issues (20)
- Fix sound key split tables
- It would be nice to add some tutorials into the Wiki HOT 2
- How do I disassemble Ruby? HOT 5
- Add missing voice macros
- Make gbagfx give some better error messages HOT 4
- ...
- Better ELF support. HOT 1
- Miscellaneous issues. HOT 3
- libgcc.a missing HOT 5
- Enforce required arguments for asm macros. HOT 2
- Proposed TODO: Tool sources should be their own repository(ies) HOT 1
- Identify all sprite/palette tags. HOT 1
- devkitARM install instructions are out of date HOT 2
- Update Discord invite in readme HOT 1
- Merge battle struct and ewram names
- static, extern, etc. handling
- Some build artifacts are not in build/
- Create constant for menu cursor color
- how do you use this to replace the langfiles in a japanese copy with the english langfiles
- Any interest in a Docker build container. For CI or single dev builds.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pokeruby.