Hello all
I'm currently trying compil current Fiasco Kernel under Cygwin, unfortunatly I have a problem of compilation. when compiler try compil kip.cc I have an assembler message that said: Error: junk at the end of line, first unrecognized character is ','
Any Idea?
Thanks
Olivier
PS: my kip.cc
// AUTOMATICALLY GENERATED -- DO NOT EDIT! -*- c++ -*-
#include "kip.h" #include "kip_i.h"
#line 47 "/tudos/kernel/fiasco/src/abi/kip.cpp"
//============================================================================
#line 182 "/tudos/kernel/fiasco/src/abi/kip.cpp"
//----------------------------------------------------------------------------
#line 188 "/tudos/kernel/fiasco/src/abi/kip.cpp"
Kip *Kip::global_kip; #line 192 "/tudos/kernel/fiasco/src/abi/kip.cpp"
asm(".section .initkip.version, "a", %progbits \n" \ ".string "" CONFIG_KERNEL_VERSION_STRING "" \n" \ ".previous \n"); #line 196 "/tudos/kernel/fiasco/src/abi/kip.cpp"
asm(".section .initkip.features.fini, "a", %progbits \n" \ ".string "" \n" \ ".previous \n");
#line 110 "/tudos/kernel/fiasco/src/abi/kip.cpp"
bool Kip::add_mem_region(Mem_desc const &md) { Mem_desc *m = mem_descs(); Mem_desc *end = m + num_mem_descs(); for (;m<end;++m) { if (m->type() == Mem_desc::Undefined) { *m = md; return true; } }
// Add mem region failed -- must be a Fiasco startup problem. Bail out. assert (0);
return false; }
#line 130 "/tudos/kernel/fiasco/src/abi/kip.cpp"
Mem_region Kip::last_free() const { Mem_desc const *m = mem_descs(); Mem_desc const *const end = m + num_mem_descs(); Mem_region r; r.start = 0; r.end = 0; for (;m<end;++m) { Address s = m->start(); Address e = m->end();
// Speep out stupid descriptors (that have the end before the start) if (s>=e) { const_cast<Mem_desc*>(m)->type(Mem_desc::Undefined); continue; }
if (m->is_virtual()) // skip virtual memory descriptors continue;
switch (m->type()) { case Mem_desc::Conventional: if (e>r.end) r.end = e; if (s>r.start) r.start = s; break; case Mem_desc::Reserved: case Mem_desc::Dedicated: case Mem_desc::Shared: case Mem_desc::Arch: case Mem_desc::Bootloader: if (e>=r.start && e<r.end) { r.start = e + 1; } if (s>=r.start && s<r.end) { r.end = s - 1; } break; default: break; } } return r; }
Hi,
On Sat Nov 28, 2009 at 22:41:41 +0100, olivier wrote:
I'm currently trying compil current Fiasco Kernel under Cygwin, unfortunatly I have a problem of compilation. when compiler try compil kip.cc I have an assembler message that said: Error: junk at the end of line, first unrecognized character is ','
Any Idea?
If it's an assembler message you can get the assembly with make kip.S and look at the line where the error is told to be. Which gcc and binutils version does your cygwin have?
Adam
Hello,
Hi,
On Sat Nov 28, 2009 at 22:41:41 +0100, olivier wrote:
I'm currently trying compil current Fiasco Kernel under Cygwin, unfortunatly I have a problem of compilation. when compiler try compil kip.cc I have an assembler message that said: Error: junk at the end of line, first unrecognized character is ','
Any Idea?
If it's an assembler message you can get the assembly with make kip.S
This is an assembler message but there is no kip.S, problem is when try do Makefile.sub2 ... Generating version information ... Making kip.o cczEXyNz.s: Assembler messages: cczEXyNz.s: 117: Error: junk at end of line, first unrecognized character is ',' cczEXyNz.s: 119: 119: unknown pseudo-op: '.previous' etc.
There is inline asm in c++ code in build\auto\kip.cc and src\abi\kip.cpp
and look at the line where the error is told to be. Which gcc and binutils version does your cygwin have?
gcc 4.3.4
Adam
Thanks
Olivier
On Mon Nov 30, 2009 at 23:42:33 +0100, olivier wrote:
On Sat Nov 28, 2009 at 22:41:41 +0100, olivier wrote:
I'm currently trying compil current Fiasco Kernel under Cygwin, unfortunatly I have a problem of compilation. when compiler try compil kip.cc I have an assembler message that said: Error: junk at the end of line, first unrecognized character is ','
Any Idea?
If it's an assembler message you can get the assembly with make kip.S
This is an assembler message but there is no kip.S, problem is when
The kip.S is a generated file (done via 'make kip.S').
try do Makefile.sub2 ... Generating version information ... Making kip.o cczEXyNz.s: Assembler messages: cczEXyNz.s: 117: Error: junk at end of line, first unrecognized character is ',' cczEXyNz.s: 119: 119: unknown pseudo-op: '.previous' etc.
Anyway, the .previous is the interesting information. This should be processed by the assembler. Since this is on Windows maybe the '\n' isn't enough and there must be a \n\r or similar. Could you try to add the \r in kip.cpp and try again?
Thanks, Adam
Hello,
try do Makefile.sub2 ... Generating version information ... Making kip.o cczEXyNz.s: Assembler messages: cczEXyNz.s: 117: Error: junk at end of line, first unrecognized character is ',' cczEXyNz.s: 119: 119: unknown pseudo-op: '.previous' etc.
Anyway, the .previous is the interesting information. This should be processed by the assembler. Since this is on Windows maybe the '\n' isn't enough and there must be a \n\r or similar. Could you try to add the \r in kip.cpp and try again?
No change, I know now problem is in this lines:
asm(".section .initkip.version, "a", %progbits \n" \ ".string "" CONFIG_KERNEL_VERSION_STRING "" \n" \ ".previous \n");
asm(".section .initkip.features.fini, "a", %progbits \n" \ ".string "" \n" \ ".previous \n");
And more exactly start for compiler with the character ',' after asm(".section .initkip.version, "a"
I can't said more
Thanks
Olivier
Thanks, Adam
On Tue Dec 01, 2009 at 00:15:29 +0100, olivier wrote:
Hello,
try do Makefile.sub2 ... Generating version information ... Making kip.o cczEXyNz.s: Assembler messages: cczEXyNz.s: 117: Error: junk at end of line, first unrecognized character is ',' cczEXyNz.s: 119: 119: unknown pseudo-op: '.previous' etc.
Anyway, the .previous is the interesting information. This should be processed by the assembler. Since this is on Windows maybe the '\n' isn't enough and there must be a \n\r or similar. Could you try to add the \r in kip.cpp and try again?
No change, I know now problem is in this lines:
asm(".section .initkip.version, "a", %progbits \n" \ ".string "" CONFIG_KERNEL_VERSION_STRING "" \n" \ ".previous \n");
asm(".section .initkip.features.fini, "a", %progbits \n" \ ".string "" \n" \ ".previous \n");
And more exactly start for compiler with the character ',' after asm(".section .initkip.version, "a"
Some more digging reveals that those statements are for ELF targets only and do not work with PE targets. Seems there's no way to tell the assembler to generate ELF instead of PE on cygwin. Sorry but it seems building under Cygwin is not possible.
Adam
Adam Lackorzynski a écrit :
On Tue Dec 01, 2009 at 00:15:29 +0100, olivier wrote:
Hello,
try do Makefile.sub2 ... Generating version information ... Making kip.o cczEXyNz.s: Assembler messages: cczEXyNz.s: 117: Error: junk at end of line, first unrecognized character is ',' cczEXyNz.s: 119: 119: unknown pseudo-op: '.previous' etc.
Anyway, the .previous is the interesting information. This should be processed by the assembler. Since this is on Windows maybe the '\n' isn't enough and there must be a \n\r or similar. Could you try to add the \r in kip.cpp and try again?
No change, I know now problem is in this lines:
asm(".section .initkip.version, "a", %progbits \n" \ ".string "" CONFIG_KERNEL_VERSION_STRING "" \n" \ ".previous \n");
asm(".section .initkip.features.fini, "a", %progbits \n" \ ".string "" \n" \ ".previous \n");
And more exactly start for compiler with the character ',' after asm(".section .initkip.version, "a"
Some more digging reveals that those statements are for ELF targets only and do not work with PE targets. Seems there's no way to tell the assembler to generate ELF instead of PE on cygwin. Sorry but it seems building under Cygwin is not possible.
So is there any way to compil a Windows version?
Olivier
On Tue Dec 01, 2009 at 23:43:19 +0100, olivier wrote:
Adam Lackorzynski a écrit :
On Tue Dec 01, 2009 at 00:15:29 +0100, olivier wrote:
Hello,
try do Makefile.sub2 ... Generating version information ... Making kip.o cczEXyNz.s: Assembler messages: cczEXyNz.s: 117: Error: junk at end of line, first unrecognized character is ',' cczEXyNz.s: 119: 119: unknown pseudo-op: '.previous' etc.
Anyway, the .previous is the interesting information. This should be processed by the assembler. Since this is on Windows maybe the '\n' isn't enough and there must be a \n\r or similar. Could you try to add the \r in kip.cpp and try again?
No change, I know now problem is in this lines:
asm(".section .initkip.version, "a", %progbits \n" \ ".string "" CONFIG_KERNEL_VERSION_STRING "" \n" \ ".previous \n");
asm(".section .initkip.features.fini, "a", %progbits \n" \ ".string "" \n" \ ".previous \n");
And more exactly start for compiler with the character ',' after asm(".section .initkip.version, "a"
Some more digging reveals that those statements are for ELF targets only and do not work with PE targets. Seems there's no way to tell the assembler to generate ELF instead of PE on cygwin. Sorry but it seems building under Cygwin is not possible.
So is there any way to compil a Windows version?
The easiest is probably to install Linux in a VM.
Adam
l4-hackers@os.inf.tu-dresden.de