My guess is that because in original code three different types of flags
are added to linkflags together.  For -ldramsim it should be added to
'LIBS', -L flag should be added to 'LIBPATH' and -Wl, flags should be added
to 'LINKFLAGS'.

- Avadh

On Mon, Sep 10, 2012 at 6:14 PM, Mu, Shuai <[email protected]> wrote:

>  Yes, the problem is caused  by adding quotes to the link flags. I am
> totally confused why this happened. ****
>
> My scons’ version is 2.1.0.r5357.****
>
> ** **
>
> *From:* Paul Rosenfeld [mailto:[email protected]]
> *Sent:* Monday, September 10, 2012 11:07 PM
>
> *To:* Mu, Shuai
> *Cc:* [email protected]
> *Subject:* Re: [marss86-devel]
> 答复: link error when compiling marss.dramsim****
>
>  ** **
>
> Huh, that's interesting. I just tried on our Ubuntu 12.04 machine with the
> same version of python and this didn't happen. The problem is that it's
> adding quotes around those DRAMSim2 link flags? What version of SCons are
> you running?****
>
> On Mon, Sep 10, 2012 at 3:58 AM, Mu, Shuai <[email protected]> wrote:****
>
> Hi, Paul:****
>
>  ****
>
>        I have find the problem. It is caused by different versions of
> Python.****
>
>        I used Ubuntu 12.04 with python 2.7.3, when I compile with scons
> pretty=0, the error information is as follows:****
>
>  ****
>
>     g++ -L/usr/lib/x86_64-linux-gnu -Wl,-Bsymbolic-functions -Wl,-z,relro
> -Wl,--warn-common -m64 -lX11 *"-ldramsim -L/home/mushuai/DRAMSim2
> -Wl,-rpath=/home/mushuai/DRAMSim2"* -o qemu/qemu-img qemu/qemu-img.o
> qemu/qemu-tool.o qemu/cutils.o qemu/cache-utils.o qemu/qemu-malloc.o
> qemu/qemu-option.o qemu/module.o qemu/nbd.o qemu/block.o qemu/aio.o
> qemu/aes.o qemu/posix-aio-compat.o qemu/qemu-config.o qemu/block/blkdebug.o
> qemu/block/blkverify.o qemu/block/bochs.o qemu/block/cloop.o
> qemu/block/cow.o qemu/block/curl.o qemu/block/dmg.o qemu/block/nbd.o
> qemu/block/parallels.o qemu/block/qcow.o qemu/block/qcow2-cache.o
> qemu/block/qcow2-cluster.o qemu/block/qcow2-refcount.o
> qemu/block/qcow2-snapshot.o qemu/block/qcow2.o qemu/block/qed-check.o
> qemu/block/qed-cluster.o qemu/block/qed-gencb.o qemu/block/qed-l2-cache.o
> qemu/block/qed-table.o qemu/block/qed.o qemu/block/raw-posix.o
> qemu/block/raw.o qemu/block/sheepdog.o qemu/block/vdi.o qemu/block/vmdk.o
> qemu/block/vpc.o qemu/block/vvfat.o qemu/qint.o qemu/qstring.o qemu/qdict.o
> qemu/qlist.o qemu/qfloat.o qemu/qbool.o qemu/qjson.o qemu/json-lexer.o
> qemu/json-streamer.o qemu/json-parser.o qemu/qerror.o qemu/osdep.o
> qemu/oslib-posix.o qemu/qemu-error.o qemu/qemu-timer-common.o
> -Wl,--whole-archive -Wl,--no-whole-archive -lz -lSDL -lasound -lm -ldl
> -lpulse-simple -lpulse -lXext -lcaca -lX11 -lgnutls -lcurses -lpthread -lrt
> -lcurl -lm -lz****
>
> /usr/bin/ld: cannot find -ldramsim -L/home/mushuai/DRAMSim2
> -Wl,-rpath=/home/mushuai/DRAMSim2****
>
> collect2: ld returned 1 exit status****
>
>  ****
>
>    Therefore, I modified the qemu/SConstruct file.****
>
>    from env.Append(LINKFLAGS = '-ldramsim -L%s -Wl,-rpath=%s'
> %(dramsim_path, dramsim_path))  ****
>
>    to         env.Append(LINKFLAGS = '-ldramsim')****
>
>     env.Append(LINKFLAGS = '-L%s' % dramsim_path)****
>
>     env.Append(LINKFLAGS = '-Wl,-rpath=%s' % dramsim_path)****
>
>   It can be compiled successfully.****
>
>  ****
>
> Thanks for your help.****
>
>  ****
>
> Shuai Mu    ****
>
>  ****
>
>  ****
>
> *From:* Paul Rosenfeld [mailto:[email protected]]
> *Sent:* Sunday, September 09, 2012 12:33 AM
> *To:* Mu, Shuai
> *Cc:* [email protected]
> *Subject:* Re: [marss86-devel] 答复: link error when compiling marss.dramsim
> ****
>
>  ****
>
> DRAMSim2 is a pretty simple library -- you shouldn't be running into any
> obscure linking problems. Just in case, could you post the output of the
> linking step when you compile with scons pretty=0****
>
>  ****
>
>  ****
>
>  ****
>
> On Fri, Sep 7, 2012 at 11:31 PM, Mu, Shuai <[email protected]> wrote:****
>
> Yes, i have built the dramsim library sucessfully.
> ________________________________________
> 发件人: Alireza Haghdoost [[email protected]]
> 发送时间: 2012年9月8日 3:36
> 到: Mu, Shuai
> Cc: [email protected]
> 主题: Re: [marss86-devel] link error when compiling marss.dramsim****
>
>
> is there any libdramsim.so in /home/user/DRAMSim2 ?****
>
> On Fri, Sep 7, 2012 at 8:57 AM, Mu, Shuai <[email protected]<mailto:
> [email protected]>> wrote:
> Hi,All:
>
>     I encounter an error when i compile the marss.dramsim.
>     I have downloaded the DRAMSim2 and compile DRAMSim2 successfully.(make
> libdramsim.so)
>     When i compile the marssX86 using the command: scons
> dramsim=my/path/to/DRAMSim2, an error comes out.
>     /usr/bin/ld : cannot find -ldramsim -L/home/user/DRAMSim2 -Wl,
> -rpath=/home/user/DRAMSim2
>     I follow the instructions on the websit:
> https://github.com/dramninjasUMD/DRAMSim2/wiki/MARSSx86-with-DRAMSim2
>     Does anyone meet the problem?
>
>     Thanks a lot.
>     Regards.
>
> Shuai
>
> _______________________________________________
> http://www.marss86.org
> Marss86-Devel mailing list****
>
> [email protected]<mailto:[email protected]>
> https://www.cs.binghamton.edu/mailman/listinfo/marss86-devel****
>
>
>
> _______________________________________________
> http://www.marss86.org
> Marss86-Devel mailing list
> [email protected]
> https://www.cs.binghamton.edu/mailman/listinfo/marss86-devel****
>
>  ****
>
> ** **
>
> _______________________________________________
> http://www.marss86.org
> Marss86-Devel mailing list
> [email protected]
> https://www.cs.binghamton.edu/mailman/listinfo/marss86-devel
>
>
_______________________________________________
http://www.marss86.org
Marss86-Devel mailing list
[email protected]
https://www.cs.binghamton.edu/mailman/listinfo/marss86-devel

Reply via email to