By the way,

The original benchmark which compiled successfully, when run with Gem5 in FS 
mode, the program was aborted. The error message received was:

Build/XC86/arch/xc86/tlb.cc.351: Fault XC86ISA::TLB::translate(RequestPtr, 
ThreadContext*, BaseTLB::Translation*, BaseTLB::Mode, bool&, bool): Assertion 
entry failed

--- BEGIN LIBC BACKTRACE --- shows issues with libpthread.so.0, libc.so.6, 
libpython2.7.so.1.0

So, in conclusion, although I was able to compile it in chroot, the program was 
not able to run in Gem5. 
Any thoughts on that?

Regards,
Elena

-----Original Message-----
From: gem5-users [mailto:gem5-users-boun...@gem5.org] On Behalf Of Woo L.L.
Sent: 03 February 2017 13:54
To: gem5 users mailing list <gem5-users@gem5.org>
Subject: Re: [gem5-users] Error with GLIBC 2.7 while trying to run C program in 
FS Mode

Hi Ferran,

I did as per your suggestions.
Initially, I was still facing with errors /bin/bash: /lib32/libc.so.6: version 
'GLIBC_2.11' not found as I am using the image that comes with GemFI (Gem5 with 
Fault Injection).

I redo the steps with the image downloaded from official gem5 web and I managed 
to chroot to the image. So, I recompile the original benchmark and it works 
fine. I also have a modified version of the benchmark source program where it 
includes calling external library. But when I tried to compile it with the 
following command:

Gcc -I/home/llw1n14/RTS/runtime/gemfi/ -L/home/llw1n14/RTS/runtime/gemfi/ 
qsort_small_fi.c -o qsort_small_fi -lm5

It gives me errors of being unable to read the header file (m5op.h) Do I need 
to mount the external library as well unto the image?

Thanks.
Elena

-----Original Message-----
From: gem5-users [mailto:gem5-users-boun...@gem5.org] On Behalf Of Ferran Olid
Sent: 03 February 2017 12:58
To: gem5-users@gem5.org
Subject: Re: [gem5-users] Error with GLIBC 2.7 while trying to run C program in 
FS Mode

Hi Elena,

I assume that, in order to do full system simulation you have downloaded one of 
the images from the gem5 official web, right? What you have to do then is the 
following:

sudo su
cd /directory/where/your/image/is/located/

mkdir tmp_mnt

mount -o loop,offset=32256 x86root.img ./tmp_mnt     # assuming your 
image is called x86root.img
mkdir -p ./tmp_mnt/benchmarks
cp -r /your/benchmark/sources  ./tmp_mnt/benchmarks

# Now time to mount /proc, /sys and /dev mount -o bind /proc ./tmp_mnt/proc 
mount -o bind /dev ./tmp_mnt/dev mount -o bind /sys ./tmp_mnt/sys

# Chroot to the image
chroot ./tmp_mnt


Once you've done this, you will be chrooted to your image. Just navigate to 
your benchmark directory (/benchmarks in the case above) and compile as you 
would normally do. Once everything is done, use `exit` to go back to your 
system. Remember to unmount proc, dev and sys from your image once you've 
exited the chroot (`umount ./tmp_mnt/proc` and so on). If compilation went ok, 
then your benchmarks should work.


Cheers,
Ferran O


On 03/02/17 13:09, Woo L.L. wrote:
> Hi Ferran,
>
> I have never done chroot before, so this was my first attempt. What I did was:
> a) Install schroot and debootstrap
> b) Creating a chroot at my mounted image
> c) Edit the schroot.conf
> d) Created basic installation of Ubuntu 14.04 in the chroot
>
> But I encountered errors while trying to create a basic installation of 
> Ubuntu - all on GLIBC
>       - Failure trying to run: chroot 
> /home/llw1n14RTS/gemfi/x86/disks/mountpoint mount -t proc proc /proc
>       -       mount: /lib32/libc.so.6: version 'GLIBC_2.7' not found 
> (required by mount)
>       -       mount: /lib32/libc.so.6: version 'GLIBC_2.7' not found 
> (required by /lib/i386-linux-gnu/libblkid.so.1)
>       -       mount: /lib32/libc.so.6: version 'GLIBC_2.7' not found 
> (required by /lib/i386-linux-gnu/libselinux.so.1)
>       -       mount: /lib32/libc.so.6: version 'GLIBC_2.8' not found 
> (required by /lib/i386-linux-gnu/libblkid.so.1)
>       -       mount: /lib32/libc.so.6: version 'GLIBC_2.8' not found 
> (required by /lib/i386-linux-gnu/libmount.so.1)
>       -       mount: /lib32/libc.so.6: version 'GLIBC_2.7' not found 
> (required by /lib/i386-linux-gnu/libmount.so.1)
>
> I can't create a basic installation of Ubuntu in my mounted image, and 
> I can chroot to my mounted image. All due to the issue of libc.so.6 A check 
> in the folder /lib32, /lib64 and /lib, I found that libc.so.6 is a link to 
> libc-2.19.so.
> I don't understand what happen. If it is link to libc-2.19.so (which is the 
> EGLIBC 2.19 I presume), then logically it shouldn’t have any error on GLIBC.
>
> Really needed help here.
> Thanks.
>
> Elena
>
>
> -----Original Message-----
> From: gem5-users [mailto:gem5-users-boun...@gem5.org] On Behalf Of 
> Ferran Olid
> Sent: 03 February 2017 10:38
> To: gem5-users@gem5.org
> Subject: Re: [gem5-users] Error with GLIBC 2.7 while trying to run C 
> program in FS Mode
>
> Hi Elena,
>
> Maybe you could try to mount the image you are using to run the experiments 
> in FS mode, chroot to it and compile these benchmarks there.
> You'll also have to mount /proc, /dev and /sys to your mounte image before 
> chrooting.
>
> Hope this helps,
> Ferran O.
>
> On 03/02/17 11:30, Woo L.L. wrote:
>> Hi Pierre-Yves,
>>
>> I did tried compiling it with the -static flag for the first few benchmarks 
>> that I have run, but I got a segmentation fault. So, I tried compiling it 
>> without the -static flag, and it works.
>>
>> But for this benchmark (QSort and Dijkstra) from MiBench, I tried to compile 
>> without the -static flag, and I got the error /lib/libc.so.6: version 
>> 'GLIBC_2.7' not found. If I compile it with the -static flag, I got 
>> segmentation error.
>>
>> So I am really stuck at this. Please help.
>> Thanks.
>>
>> Regards,
>> Elena
>>
>> -----Original Message-----
>> From: gem5-users [mailto:gem5-users-boun...@gem5.org] On Behalf Of 
>> Pierre-Yves Péneau
>> Sent: 03 February 2017 10:14
>> To: gem5-users@gem5.org
>> Subject: Re: [gem5-users] Error with GLIBC 2.7 while trying to run C 
>> program in FS Mode
>>
>> Hi Elena,
>>
>> You should try to compile with the -static flag.
>>
>> On 02/03/2017 11:09 AM, Woo L.L. wrote:
>>> Hi there,
>>>
>>> I run a couple of benchmarks from MiBench Automotive package under FS Mode 
>>> successfully.
>>> I wanted to test other benchmarks from the same MiBench, so I compiled 
>>> those C programs as usual using GCC (I have GCC 4.8.4 in my Ubuntu). No 
>>> errors in compiling and even running it from the terminal.
>>>
>>> However, when I try to run it with Gem5 un FS Mode, it gives me the problem 
>>> /lib/libc.so.6: version 'GLIBC_2.7' not found. In my system, I had EGLIBC 
>>> 2.19 installed (I checked using ldd -version). I tried to search for some 
>>> solutions, where most users suggest to recompile again with the newer GLIBC 
>>> (which I did), but it didn't solve the problem. I am able to run it from 
>>> the terminal, but not from Gem5.
>>>
>>> Has anyone ever encounter this issue and is there a solution to it?
>>> Appreciate all your help.
>>> Thanks.
>>>
>>> Thanks and Regards,
>>>
>>> Elena Woo Lai Leng
>>> Faculty of Electronic and Computer Science (ECS) University of 
>>> Southampton
>>>
>>> Email: l.l....@soton.ac.uk<mailto:l.l....@soton.ac.uk>
>>> Website: www.ecs.soton.ac.uk<http://www.ecs.soton.ac.uk>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> gem5-users mailing list
>>> gem5-users@gem5.org
>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>>
>
> _______________________________________________
> gem5-users mailing list
> gem5-users@gem5.org
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
> _______________________________________________
> gem5-users mailing list
> gem5-users@gem5.org
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users


_______________________________________________
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to