gpt4 book ai didi

ubuntu - 尝试在 Ubuntu 12.04LTS 上运行 Qsim 时出现 "bad option -readonly"错误

转载 作者:行者123 更新时间:2023-12-04 18:38:10 24 4
gpt4 key购买 nike

我正在尝试在 Qsim 上测试我的 Verilog 代码。当我打开 Qsim 并尝试打开我的项目时,它给了我一个错误 bad option "-readonly": must be -group, -owner, or -permissions .我不知道这个错误是什么意思,我不知道如何解决它。如果有人可以帮助我,那就太棒了。

我在使用 Quartus 2 v12.0SP2 的 64 位 Ubuntu 12.04 计算机上。

最佳答案

有点谷歌搜索说这可能是 TCL 脚本错误消息。添加 QSIM 和报价
我受到了打击,但可以访问 Altera 论坛文件(关于
数据库错误)。

我从谷歌缓存中得到了这个[Qsim Linux? [存档] - Altera 论坛]( http://www.alteraforum.com/forum/archive/index.php/t-32358.html .

gPaiva
October 20th, 2011, 08:53 PM
Hi i am new to FPGAs , and tried to install it on linux , quartus runs fine,
but i need a simulation . i tried type at shell quartus_sh -qsim , the qsim
opened but when i try open a project i get this result:

img820.imageshack.us/img820/673/capturadetelaf.png (not allowed to post
links, lol :()

if u cant see the image it says : bad option "-readonly": must be -group,
-owner or -permissions

...

AnthonyWBrown
March 30th, 2012, 09:25 AM
Have you found a cure for this yet?

Actually, I found a workaround. Looks like there is a syntax problem with
the tcl script, it appears to try to clear the -readonly permissions on
the various files. My knowledge of tcl would fit on the head of a pin, but
according to the tcl documentation I found you can only do that on a Mac.
Linux allows you to do -owner and -group and -permissions, which makes
sense for linux filesystems, I guess. Anyhow, hence the error.

This -readonly thing is done in several places, but the one that causes the
problem you describe is in the "qsim:open_project" procedure. If you edit
the file quartus/common/tcl/apps/qsim/qsim_script.tcl and go down to line
1413 or so you should find:

file attributes db -readonly 0

comment this out by putting a # in front and save it and you're good to go.
If you feel keen, you could find the other places the file attributes
-readonly function is called and comment them out, too. If you were feeling
super keen, you could fix the tcl to use something cross-platform compatible
and submit a patch to Altera.....

Hope this helps.

A/B

nigelg
August 17th, 2012, 07:04 AM
thanks for the workaround, just got clobbered by it.

something like this works as a patch, a bit long winded.

#######################################
set my_plat [lindex $tcl_platform(os) 0]
if {[string equal $my_plat "Linux"]} {
if {[file writable db] == 0} {
# not writable so get current permissions
set myperms [file attributes db -permissions]
#set user write permissions leaving rest unchanged
set myperms [expr $myperms | 0200]
file attributes db -permissions $myperms
}

} else {
# hopefully it's windoze
file attributes db -readonly 0
}
########################################

My tcl is fairly limited so there are probably better ways to do it.

nigelg
August 17th, 2012, 07:16 AM
oops, wrong draft,

set myperms [expr $myperms | 0200]

should read
set myperms [expr $myperms + 0200]

haulisson
September 18th, 2012, 03:46 PM
Hi guys,

Its solutions were very ingenious, but I do not know much Tcl script. So,
could someone tell where I put this patch proposed by nigelg.

Best Regards

nigelg
October 15th, 2012, 08:13 AM
Hi,

find the lines containing

file attributes db -readonly 0

as described in an earlier post, comment out the line and replace with the
correct version of my patch. You will need to do this for each original
occurence of the line.

HTH
Nigel

似乎 QSIM 的 Linux 用户并不多,或者 Altera 期望他们这样做
自给自足。 (并且引用论坛帖子作为代码比完全更容易
重新格式化它们)。

正在运行 http://wiki.sj.ifsc.edu.br/wiki/index.php/Uso_do_Quartus_II_nos_Labs_do_IFSC通过谷歌翻译给了我们另一个关于同一个 Altera 论坛线程的点击,但修复略有不同:

修复 Qsim 中的 BUG。
When installing Qsim an error (bad option "-readonly": must be-group, or-permissions-owner) can occur when opening the project file generated in Quartus II. The fix is to open the file quartus / common / tcl / apps / Qsim / qsim_script.tcl and comment lines:

699 # file attributes $ Qsim :: project_dir / Qsim / $ Qsim :: project_name.sim.vwf-readonly 1
812 # file attributes $ Qsim :: project_dir / Qsim / $ Qsim :: project_name.sim.vwf-readonly 1
1413 # file attributes db-readonly 0

SOURCE: http://www.alteraforum.com/forum/archive/index.php/t-32358.html

关于ubuntu - 尝试在 Ubuntu 12.04LTS 上运行 Qsim 时出现 "bad option -readonly"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21650750/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com