Can you try older version of libptotoc like libprotoc 2.6.1?

On Thu, Jul 25, 2019 at 11:18 AM Rosen Lu <wisdom....@gmail.com> wrote:

> Hi,
>
> I set the environment as follow:
>
> export PATH=$PATH:/usr/local/protobuf/bin
> export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/protobuf/lib
> export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/protobuf/lib
>
> Best,
> Rosen
>
> Serhat Gesoglu <serhat.geso...@manchester.ac.uk> 于2019年7月25日周四 上午9:43写道:
>
>> Hello,
>> Could you try locating the protoc bin and setting the environment PROTOC
>> to it?
>>
>> Serhat
>>
>> ------------------------------
>> *From:* gem5-users [gem5-users-boun...@gem5.org] on behalf of Rosen Lu [
>> wisdom....@gmail.com]
>> *Sent:* 25 July 2019 15:06
>> *To:* gem5 users mailing list
>> *Subject:* Re: [gem5-users] MemTraceProbe cannot be imported successfully
>>
>> Hello Serhat,
>>
>> Thank you for your reply. After I rebuilt gem5, the following error
>> message prompted:
>> ***
>> scons: Reading SConscript files ...
>> Package protobuf was not found in the pkg-config search path.
>> Perhaps you should add the directory containing `protobuf.pc'
>> to the PKG_CONFIG_PATH environment variable
>> No package 'protobuf' found
>> Warning: pkg-config could not get protobuf flags.
>> Checking for C header file Python.h... (cached) yes
>> Checking for C library pthread... (cached) yes
>> Checking for C library dl... (cached) yes
>> Checking for C library util... (cached) yes
>> Checking for C library m... (cached) yes
>> Checking for C library python2.7... (cached) yes
>> Checking for accept(0,0,0) in C++ library None... (cached) yes
>> Checking for zlibVersion() in C++ library z... (cached) yes
>> Checking for GOOGLE_PROTOBUF_VERIFY_VERSION in C++ library protobuf...
>> (cached) no
>> Warning: did not find protocol buffer library and/or headers.
>>        Please install libprotobuf-dev for tracing support.
>> Checking for clock_nanosleep(0,0,NULL,NULL) in C library None... (cached)
>> yes
>> Checking for timer_create(CLOCK_MONOTONIC, NULL, NULL) in C library
>> None... (cached) no
>> Checking for timer_create(CLOCK_MONOTONIC, NULL, NULL) in C library rt...
>> (cached) yes
>> Checking for C library tcmalloc... (cached) no
>> Checking for C library tcmalloc_minimal... (cached) no
>> You can get a 12% performance improvement by installing tcmalloc
>> (libgoogle-perftools-dev package on Ubuntu or RedHat).
>> Checking for backtrace_symbols_fd((void*)0, 0, 0) in C library None...
>> (cached) no
>> Checking for backtrace_symbols_fd((void*)0, 0, 0) in C library
>> execinfo... (cached) no
>> No suitable back trace implementation found.
>> Checking for C header file fenv.h... (cached) yes
>> Checking for C header file png.h... (cached) no
>> Warning: Header file <png.h> not found.
>>          This host has no libpng library.
>>          Disabling support for PNG framebuffers.
>> Checking for C header file linux/kvm.h... (cached) yes
>> Checking for C header file linux/if_tun.h... (cached) yes
>> Checking size of struct kvm_xsave ... (cached) yes
>> Checking for member exclude_host in struct perf_event_attr...(cached) yes
>> Checking whether __i386__ is declared... (cached) no
>> Checking whether __x86_64__ is declared... (cached) yes
>> Building in /home/cc/gem5-prefetch-camat/build/X86
>> Using saved variables file
>> /home/cc/gem5-prefetch-camat/build/variables/X86
>> ImportError: No module named MemTraceProbe:
>>   File "/home/cc/gem5-prefetch-camat/SConstruct", line 1249:
>>     SConscript('src/SConscript', variant_dir = variant_path, exports =
>> 'env')
>>   File "/usr/lib/python2.7/site-packages/SCons/Script/SConscript.py",
>> line 614:
>>     return method(*args, **kw)
>>   File "/usr/lib/python2.7/site-packages/SCons/Script/SConscript.py",
>> line 551:
>>     return _SConscript(self.fs, *files, **subst_kw)
>>   File "/usr/lib/python2.7/site-packages/SCons/Script/SConscript.py",
>> line 260:
>>     exec _file_ in call_stack[-1].globals
>>   File "/home/cc/gem5-prefetch-camat/build/X86/SConscript", line 532:
>>     exec('from m5.objects import %s' % modname)
>>   File "<string>", line 1:
>>     None
>>   File "/home/cc/gem5-prefetch-camat/build/X86/SConscript", line 512:
>>     exec file(source.abspath, 'r') in mod.__dict__
>>   File "/home/cc/gem5-prefetch-camat/src/cpu/simple/AtomicSimpleCPU.py",
>> line 42:
>>     from BaseSimpleCPU import BaseSimpleCPU
>>   File "/home/cc/gem5-prefetch-camat/build/X86/SConscript", line 512:
>>     exec file(source.abspath, 'r') in mod.__dict__
>>   File "/home/cc/gem5-prefetch-camat/src/cpu/simple/BaseSimpleCPU.py",
>> line 31:
>>     from BaseCPU import BaseCPU
>>   File "/home/cc/gem5-prefetch-camat/build/X86/SConscript", line 512:
>>     exec file(source.abspath, 'r') in mod.__dict__
>>   File "/home/cc/gem5-prefetch-camat/src/cpu/BaseCPU.py", line 60:
>>     from m5.objects.MemTraceProbe import *
>> ***
>>
>> I think this error was because of the absence of protobuf.  However, I
>> have installed protobuf,
>> ***
>> protoc --version
>> libprotoc 3.9.0
>> ***
>> So is this a version mismatch problem?
>>
>> Best,
>> Rosen
>>
>>
>> Serhat Gesoglu <serhat.geso...@manchester.ac.uk> 于2019年7月25日周四 上午6:33写道:
>>
>>> Hello,
>>> If you are using the recent versions of gem5, you should use:
>>> ***
>>> from m5.objects.CommMonitor import *
>>> from m5.objects.MemTraceProbe import *
>>> ***
>>>
>>> instead of "from <module> import *"
>>>
>>> I just did a clean install / build and did not have any errors.
>>>
>>> Kind regards
>>> Serhat
>>>
>>> ________________________________________
>>> From: gem5-users [gem5-users-boun...@gem5.org] on behalf of Rosen Lu [
>>> wisdom....@gmail.com]
>>> Sent: 25 July 2019 05:48
>>> To: gem5-users@gem5.org
>>> Subject: [gem5-users] MemTraceProbe cannot be imported successfully
>>>
>>> Hello,
>>>
>>> I am trying to have a monitor between the CPU and L1 Cache, so for
>>> src/cpu/BaseCPU.py, I edited the function "addPrivateSplitL1Caches":
>>> ...
>>>         #self.dcache_port = dc.cpu_side
>>>         self.monitor = CommMonitor()
>>>         self.monitor.trace = MemTraceProbe(trace_file="trace.txt")
>>>         self.dcache_port = self.monitor.slave
>>>         self.monitor.master = dc.cpu_side
>>> ..
>>> I got an error: 'MemTraceProbe' is not defined
>>>
>>> Then, I  imported CommMonitor and MemTraceProbe in BaseCPU.py
>>> However, MemTraceProbe cannot be imported successfully.
>>> How to solve this problem?
>>> I will appreciate any help.
>>>
>>> Best regards,
>>> Rosen
>>> _______________________________________________
>>> 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