现在的位置: 首页 > 综合 > 正文

win7 ubuntu

2013年02月11日 ⁄ 综合 ⁄ 共 5356字 ⁄ 字号 评论关闭

一、

安装了win7,想再安装ubuntu

本来Win7 有C D E三个区和系统保留区,后来就在E盘用Win7自带工具,多分出来50G,用来给linux

但是,在ubuntu安装是时候却发现只有2个分区,一个就是sda和C盘一样的,然后就是剩余一个区是其它几个分区之和。

整了半天终于搞清楚了

Win7自带的分区工具有问题,它建立分区的时候,默认都是建立主分区了,而一个盘最多只能建立4个主分区。

如果再建立新的分区,win7就会把除了系统盘所有分区自动转换为动态分区,这种动态分区里面可以建立很多分区,理论上是更合理的。

但是一旦动态分区被建立,其它系统就认不得了,会把所有的看出一个分区。如果要装其它系统,要么没法装,要么就得全部格式化再装。

关于如何把动态分区转换为普通分区,网上有些说明,都挺不容易。

我也没有尝试了。后来索性把系统重装。不过win7自带系统盘也不支持对动态分区进行操作。

我索性就用xp盘工具,快速将系统分作4个区,然后做了一下调整,重新分区。

XP划分的分区是区分了主分区和逻辑分区的,而且成功得删除了系统保留区。

这样子随便建立分区就没有问题了。

二、

今天在ubuntu上安装ndk,编译是时候,明明arm-linux-androideabi-g++在文件夹,却提示文件不存在,后来发现是64bit的系统ndk有问题

ndk 编译链为32位版本,而系统版本为64位

要安装几个包

sudo
apt-get install libc6-dev-i386

sudo
apt-get install ia32-libs



三、 unresolvable
R_ARM_THM_CALL relocation against symbo

http://sourceware.org/ml/binutils/2011-09/msg00162.html
They occured in situations where we had an out-of-range Thumb-2 call
to foo's PLT entry.  The linker correctly redirects the call to a stub,
but it doesn't then record that the relocation has been statically resolved.

(Of course, when we use a stub, the branch to the stub itself is always
statically resolved.  In those cases we want to know whether the stub's
target is statically resolved or not.)


http://sourceware.org/ml/binutils/2011-09/msg00162.html

I just saw that chromium-browser wasn't built with -fPIE on armel due to this bug:
http://code.google.com/p/chromium/issues/detail?id=55439

http://launchpadlibrarian.net/55522699/buildlog_ubuntu-maverick-armel.chromium-browser_6.0.472.55~r58392-0ubuntu1_FAILEDTOBUILD.txt.gz

  LINK(target) out/Release/chrome
/usr/bin/ld.bfd.real: out/Release/obj.target/skia/libskia.a(SkBlurDrawLooper.o)(.text._ZN16SkBlurDrawLooper10CreateProcER23SkFlattenableReadBuffer[SkBlurDrawLooper::CreateProc(SkFlattenableReadBuffer&)]+0x6):
unresolvable R_ARM_THM_CALL relocation against symbol `operator new(unsigned int)@@GLIBCXX_3.4'
/usr/bin/ld.bfd.real: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status

I think we should look into it, -fPIE is needed for some security features and web browsers are a critical piece of software that we want to protect.

Cheers,


how to disable

http://forums.mozillazine.org/viewtopic.php?f=42&t=2131091

CFLAGS="-fno-PIE"
CXXFLAGS="-fno-PIE"

PIE

http://stackoverflow.com/questions/2463150/fpie-position-independent-executable-option-gcc-ld

PIE is to support ASLR http://en.wikipedia.org/wiki/Address_space_layout_randomization

Before adding a PIE mode the program's executable can't be placed at randomly address in memory, only PIC dynamic libraries can be relocated to random. So, to allowing a randomization of the program binary itself
the PIE mode was created. It works very much like what PIC does for dynamic libraries. The difference is that PLT is not created, the PC-relative relocation is used.

After adding a PIE support to gcc/linkers, the body of program is compiled and linked as position-independent code. Dynamic linker do a full relocation processing of program module (as it was done for dynamic libs).
Any usage of global data is converted to access via GOT and GOT relocations are added.

The PIE is good described at this OpenBSD PIE presentation http://www.openbsd.org/papers/nycbsdcon08-pie/

Changes to functions are showed at http://www.openbsd.org/papers/nycbsdcon08-pie/mgp00004.html slide (pie vs pic) and athttp://www.openbsd.org/papers/nycbsdcon08-pie/mgp00005.html slide
(pie vs old-style link)

Note, that PIE is incompatible with -static

PLT

http://pic.dhe.ibm.com/infocenter/cicsts/v4r1/index.jsp?topic=%2Fcom.ibm.cics.ts.resourcedefinition.doc%2Fmacros%2Fplt%2Foverview.html

PLT—program list table

A program list table (PLT) specifies programs that you want to run during CICS startup and shutdown, and groups of programs that you want to enable and disable together

problem still can't be fixed

http://www.cnblogs.com/coding-way/archive/2012/08/15/2639784.html

"下载两个源码,一个是主源码,一个是mupdf-thirdparty.zip第三方的库,然后在mupdf的根目录make,生成generated目录,然后进入android,运行ndk-build,即可编译成功,我遇到一些问题:

当编译全局的mupdf时,出现了

CC build/debug/x11_image.o
apps/x11_image.c:21:33: 致命错误: X11/extensions/XShm.h:没有那个文件或目录
编译中断。

这个问题,解决方法是安装xorg-dev,sudo apt-get install xorg-dev。

 

当编译android的mupdf库时,出现

SharedLibrary : libmupdf.so
/home/zkw/developer/android-ndk-r8b/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/http://www.cnblogs.com/http://www.cnblogs.com/arm-linux-androideabi/bin/ld: ./obj/local/armeabi/libmupdfcore.a(pdf_fontfile.o)(.text.pdf_lookup_builtin_font+0x18):
unresolvable R_ARM_THM_CALL relocation against symbol `strcmp'

/home/zkw/developer/android-ndk-r8b/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/http://www.cnblogs.com/http://www.cnblogs.com/arm-linux-androideabi/bin/ld: final link
failed: Nonrepresentable section on output

collect2: ld returned 1 exit status

这是android-ndk的问题,我以前用7b的时候就没问题,升级到8b就这样了,网上找了半天,终于在一个IRC的log里面找到解决办法,目测只限r8b版本的ndk,方法就是:把android-ndk-r8b/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/arm-linux-androideabi/bin/目录下的ld文件改成ld.gold的符号链接"

四、卸载vmware的神器

VMware_Install_Cleaner

/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.3/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.3/libstdc++.a when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.3/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.3/libstdc++.a when searching for -lstdc++
/usr/bin/ld: cannot find -lstdc++
collect2: ld returned 1 exit status

Try installing
the "g++-multilib" package. It contains non-native library versions for many standard libraries.

开终端,输入 sudo rmmod psmouse 禁用触摸板,输入 sudo modprobe psmouse 恢复触摸板

抱歉!评论已关闭.