我试着在 StackOverflow 上问这个问题,但随之而来的死寂让我想知道是否可能需要更多 Ubuntu 特定的专业知识。
我正在尝试构建一个静态版本的 Python:
./configure --disable-shared LDFLAGS="-static -static-libgcc" CPPFLAGS="-static"
Run Code Online (Sandbox Code Playgroud)
但是,运行make如上配置最终会产生一些警告和错误:
gcc -pthread -static -static-libgcc -Xlinker -export-dynamic -o python \
Modules/python.o \
libpython2.7.a -lpthread -ldl -lutil -lm
<SNIP>
libpython2.7.a(posixmodule.o): In function `posix_initgroups':
Python-2.7.2/./Modules/posixmodule.c:3981: warning: Using 'initgroups' in
statically linked applications requires at runtime the shared
libraries from the glibc version used for linking
/usr/bin/ld: dynamic STT_GNU_IFUNC symbol `strcmp' with pointer equality in
`/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/../../../libc.a(strcmp.o)'
can not be used when making an executable;
recompile with -fPIE …Run Code Online (Sandbox Code Playgroud) 在 Kubuntu 11.04 上,我刚刚安装了gvim,它神奇地为一堆文本文件添加了“用 gvim 打开”。很好,但我想添加另一个,以便从gvim给定的文件开始并将当前工作目录更改为文件位置:
gvim -f %F -c "cd %d"
Run Code Online (Sandbox Code Playgroud)
上面的命令工作正常,但我不知道如何制作另一个“打开方式”来使用该命令。我不想将其设为默认值,只是一个选项。我正在使用的文件管理器是dolphin,如果这很重要。