Build fail on main executable

22 views
Skip to first unread message

Max Shron

unread,
Nov 12, 2010, 2:50:55 PM11/12/10
to anic
Tried it on 64-bit Ubuntu server running 2.6.32 and 64-bit FreeBSD 8.0-
RELEASE. Tried both gmake and the FreeBSD make. Same error every time:

$ make
...

Building main executable...
src/types.cpp: In member function 'TypeStatus::operator uintptr_t()
const':
src/types.cpp:1514: error: cast from 'Type*' to 'unsigned int' loses
precision
src/genner.cpp: In member function 'std::string
WordTree64::toString(unsigned int) const':
src/genner.cpp:220: warning: format '%08llX' expects type 'long long
unsigned int', but argument 3 has type 'long unsigned int'
*** Error code 1

Stop in /home/u0/mshron/anic/anic.


Any thoughts?


Max

Schell

unread,
Nov 12, 2010, 8:26:01 PM11/12/10
to anic
I'm getting a similar error:

anic ANI Compiler Makefile

Building main executable...
src/types.cpp: In member function ‘TypeStatus::operator uintptr_t()
const’:
src/types.cpp:1514: error: cast from ‘Type*’ to ‘unsigned int’ loses
precision
make: *** [anic] Error 1

I'm on OSX 10.6.5

Armin Töpfer

unread,
Nov 13, 2010, 9:08:53 PM11/13/10
to anic
No luck for me, too. Ubuntu Desktop 10.10, 64bit.

anic ANI Compiler Makefile

Building version controller...
Building lexer structure generator...
Generating lexer structures...
Compiling lexer structure object...
Building parser structure generator...
Building parser table generator...
Constructing parser table...
Generating parser structures...
Stamping version...
Version stamp is 0.74.2.22722928
Building main executable...
src/types.cpp: In member function ‘TypeStatus::operator uintptr_t()
const’:
src/types.cpp:1514: error: cast from ‘Type*’ to ‘unsigned int’ loses
precision
src/genner.cpp: In member function ‘std::string
WordTree64::toString(unsigned int) const’:
src/genner.cpp:220: warning: format ‘%08llX’ expects type ‘long long
unsigned int’, but argument 3 has type ‘long unsigned int’
make: *** [anic] Error 1

Regards,
Armin

On 13 Nov., 02:26, Schell <efsubeno...@gmail.com> wrote:
> I'm getting a similar error:
>
> anic ANI Compiler Makefile
>
> Building main executable...
> src/types.cpp: In member function ‘TypeStatus::operator uintptr_t()
> const’:
> src/types.cpp:1514: error: cast from ‘Type*’ to ‘unsigned int’ loses
> precision
> make: *** [anic] Error 1
>
> I'm on OSX 10.6.5
>
> On Nov 12, 11:50 am, Max Shron <max.sh...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Tried it on 64-bit Ubuntu server running 2.6.32 and 64-bit FreeBSD 8.0-
> > RELEASE. Tried both gmake and the FreeBSD make. Same error every time:
>
> > $ make
> > ...
>
> > Building main executable...
> > src/types.cpp: In member function 'TypeStatus::operator uintptr_t()
> > const':
> > src/types.cpp:1514: error: cast from 'Type*' to 'unsigned int' loses
> > precision
> > src/genner.cpp: In member function 'std::string
> > WordTree64::toString(unsigned int) const':
> > src/genner.cpp:220: warning:format'%08llX'expectstype'long long
> > unsigned int', but argument 3 hastype'long unsigned int'

Daniel Kersten

unread,
Nov 14, 2010, 8:34:04 AM11/14/10
to xlr...@googlemail.com, anic
This is similar to the OS X problems people are having.
Basically, the problem is that 64bit types are cast to 32bit numbers
and the compiler doesn't like this. The code will have to be altered
to work equally on both 32 and 64bit systems.

You could try this patch and work from there:
http://aur.archlinux.org/packages/anic-hg/anic-hg/uintptr.patch

2010/11/14 Armin Töpfer <xlr...@googlemail.com>:

Armin Töpfer

unread,
Nov 14, 2010, 8:37:44 AM11/14/10
to Daniel Kersten, anic
> You could try this patch and work from there:
> http://aur.archlinux.org/packages/anic-hg/anic-hg/uintptr.patch
Thank you.
I will try the patch and report back.

Daniel Kersten

unread,
Nov 14, 2010, 8:46:48 AM11/14/10
to Armin Töpfer, anic
Just a heads up, since theres been so many questions about this
lately, when you have it compiled and you run anic, the expected
output is an empty file. This is because the compiler is still
incomplete and does not yet generate working code.

2010/11/14 Armin Töpfer <xlr...@googlemail.com>:

Armin Töpfer

unread,
Nov 14, 2010, 9:20:43 AM11/14/10
to Daniel Kersten, anic
fyi: still one warning left

src/genner.cpp: In member function ‘std::string
WordTree64::toString(unsigned int) const’:
src/genner.cpp:220: warning: format ‘%08llX’ expects type ‘long long
unsigned int’, but argument 3 has type ‘long unsigned int’

2010/11/14 Daniel Kersten <dker...@gmail.com>:

Reply all
Reply to author
Forward
0 new messages