LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - ARM (https://www.linuxquestions.org/questions/slackware-arm-108/)
-   -   How to compile chromium using Alien's script ? (https://www.linuxquestions.org/questions/slackware-arm-108/how-to-compile-chromium-using-alien%27s-script-4175588249/)

Linux.tar.gz 08-29-2016 11:53 AM

How to compile chromium using Alien's script ?
 
Hi !
I'm trying to build it on ARM, but I haven't found a way to remove the invocation of -msse2 -mfpmath=sse -mmmx -msse2 -mfpmath=sse -mmmx so the build obviously fails.

http://www.slackware.com/~alien/slac...hromium/build/

dab1414 08-29-2016 12:43 PM

There is nothing in that slackbuild for those flags. Most likely its in your system flags. You can view them maybe
Code:

env
or
Code:

echo "$CFLAGS"
change CFLAGS to other you want to view, off the top of my head I can't remember all of them ( it looks like it is pulling in CRFLAGS). I am not at home to verify anything. Also I believe that they are set in /etc/profile, but I may be mistaken. You can set your own flags to use for while compiling chromium, or modify the slackbuild. Hopefully this is start in right direction, but I havent done too much with slackbuilds yet:D

Linux.tar.gz 08-30-2016 06:36 AM

I checked for the sake of being exhaustive, but no flags like that in the env.

Linux.tar.gz 08-30-2016 07:07 AM

I have the same behavior with the SBo script.

drmozes 08-30-2016 07:24 AM

Quote:

Originally Posted by Linux.tar.gz (Post 5597825)
Hi !
I'm trying to build it on ARM, but I haven't found a way to remove the invocation of -msse2 -mfpmath=sse -mmmx -msse2 -mfpmath=sse -mmmx so the build obviously fails.

http://www.slackware.com/~alien/slac...hromium/build/

At a minimum you should patch that build script. The following sets it for hard float.
If you are using soft float, change the CFLAGS to -O2 -march=armv5te

I don't know if Chromium would build on soft float but you could try!

Code:

root@platano:/tmp/build# diff -u chromium.SlackBuild.orig chromium.SlackBuild
--- chromium.SlackBuild.orig    2016-08-30 13:04:05.488717574 +0100
+++ chromium.SlackBuild 2016-08-30 13:04:40.138717590 +0100
@@ -364,8 +364,6 @@
 if [ -z "$ARCH" ]; then
  case "$MARCH" in
    i?86)    export ARCH=i486 ;;
-    armv7hl) export ARCH=$MARCH ;;
-    armv6hl) export ARCH=$MARCH ;;
    arm*)    export ARCH=arm ;;
    # Unless $ARCH is already set, use uname -m for all other archs:
    *)      export ARCH=$MARCH ;;
@@ -386,14 +384,7 @@
              #DSSE="0"
              DSSE="1"
              ;;
-  armv7hl)  SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
-            SLKLDFLAGS=""; LIBDIRSUFFIX=""
-            TARGETARCH="arm"
-            DSSE="1"
-            # Widevine not supported (no binary library available):
-            USE_CDM=0
-            ;;
-  armv6hl)  SLKCFLAGS="-O2 -march=armv6 -mfpu=vfp -mfloat-abi=hard"
+  arm)      SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
              SLKLDFLAGS=""; LIBDIRSUFFIX=""
              TARGETARCH="arm"
              DSSE="1"


Linux.tar.gz 08-30-2016 12:41 PM

Thanks a lot, looking at your diff I saw a noob-esque mistake in mine !
It's actually compiling on -current.

drmozes 09-01-2016 04:24 AM

Quote:

Originally Posted by Linux.tar.gz (Post 5598317)
Thanks a lot, looking at your diff I saw a noob-esque mistake in mine !
It's actually compiling on -current.

Please let us know when it's complete and whether it's worth building - i.e. is it fast enough?

thanks

Linux.tar.gz 09-01-2016 04:54 PM

I started compilation on a odroid xu4, but this little piece of crap crash when pushed hard on CPU (exynos).
I plan to compile on a real ARM processor (OMAP5) in the next few days. I'll post here the result.

Linux.tar.gz 09-02-2016 06:10 AM

Compiling since a few hours.
Quote:

[11097/20190] CXX obj/google_apis/drive/google_apis.task_util.o
[11098/20190] CXX obj/google_apis/drive/google_apis.time_util.o
I had to remove the -mfpu=vfpv3-d16 flag as it make the compilation fail.
To be continued...

Linux.tar.gz 09-02-2016 11:17 AM

Failure :

[14423/20190] CXX obj/third_party/WebKit/Source/modules/webgl/modules.WebGLDebugShaders.o
FAILED: obj/third_party/WebKit/Source/modules/webgl/modules.WebGLDebugShaders.o
c++ -MMD -MF obj/third_party/WebKit/Source/modules/webgl/modules.WebGLDebugShaders.o.d -DV8_DEPRECATION_WARNINGS -D_FILE_OFFSET_BITS=64 -DNO_TCMALLOC -DDISABLE_NACL -DCHROMIUM_BUILD -DCR_CLANG_REVISION=269902-1 -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_DEFAULT_RENDER_THEME=1 -DUSE_LIBJPEG_TURBO=1 -DUSE_X11=1 -DUSE_CLIPBOARD_AURAX11=1 -DENABLE_WEBRTC=1 -DENABLE_MEDIA_ROUTER=1 -DUSE_PROPRIETARY_CODECS -DENABLE_PEPPER_CDMS -DENABLE_NOTIFICATIONS -DENABLE_TOPCHROME_MD=1 -DUSE_UDEV -DFIELDTRIAL_TESTING_ENABLED -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PDF=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_MDNS=1 -DENABLE_SERVICE_DISCOVERY=1 -DENABLE_HANGOUT_SERVICES_EXTENSION=1 -DV8_USE_EXTERNAL_STARTUP_DATA -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DBLINK_IMPLEMENTATION=1 -DINSIDE_BLINK -DMOJO_USE_SYSTEM_IMPL -DENABLE_LAYOUT_UNIT_IN_INLINE_BOXES=0 -DENABLE_OILPAN=1 -DWTF_USE_CONCATENATED_IMPULSE_RESPONSES=1 -DWTF_USE_ICCJPEG=1 -DWTF_USE_QCMSLIB=1 -DWTF_USE_WEBAUDIO_FFMPEG=1 -DWTF_USE_DEFAULT_RENDER_THEME=1 -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DU_NOEXCEPT= -DU_STATIC_IMPLEMENTATION -DCHROME_PNG_WRITE_SUPPORT -DPNG_USER_CONFIG -DSK_SUPPORT_GPU=1 -DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS -DUSE_LIBPCI=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -D_FORTIFY_SOURCE=2 -Igen/shim_headers/libevent/target -Igen -I../.. -I../../skia/config -I../../third_party/WebKit/Source -I../../third_party/khronos -I../../gpu -Igen/angle -I../../third_party/icu/source/i18n -I../../third_party/icu/source/common -I../../third_party/zlib -I../../third_party/WebKit -Igen/third_party/WebKit -Igen/blink -I../../third_party/libpng -I../../third_party/libwebp -I../../third_party/ots/include -I../../third_party/iccjpeg -I../../third_party/libjpeg_turbo -I../../third_party/skia/include/core -I../../third_party/skia/include/effects -I../../third_party/skia/include/pdf -I../../third_party/skia/include/gpu -I../../third_party/skia/include/lazy -I../../third_party/skia/include/pathops -I../../third_party/skia/include/pipe -I../../third_party/skia/include/ports -I../../third_party/skia/include/utils -I../../skia/ext -I../../third_party/qcms/src -I../../v8/include -fstack-protector --param=ssp-buffer-size=4 -pthread -fno-strict-aliasing -Wall -Wno-extra -Wno-unused-parameter -Wno-missing-field-initializers -fvisibility=hidden -pipe -fPIC -Wno-unused-local-typedefs -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -Wno-maybe-uninitialized -march=armv7-a -mtune=generic-armv7-a -mfpu=neon -mfloat-abi=hard -mthumb -O2 -fno-ident -fdata-sections -ffunction-sections -funwind-tables -O2 -march=armv7-a -Wno-unused-local-typedefs -fno-exceptions -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -Wno-abi -std=gnu++11 -Wno-narrowing -c ../../third_party/WebKit/Source/modules/webgl/WebGLDebugShaders.cpp -o obj/third_party/WebKit/Source/modules/webgl/modules.WebGLDebugShaders.o
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
[14424/20190] CXX obj/third_party/WebKit/Source/modules/webgl/modules.WebGLDepthTexture.o
[14425/20190] CXX obj/third_party/WebKit/Source/modules/webgl/modules.WebGLDrawBuffers.o
ninja: build stopped: subcommand failed.
install: cannot stat 'out/Release/chrome': No such file or directory
chromium.SlackBuild FAILED at line 655

real 539m19.693s

I added a bit of SWAP to see if it's linked to a lack of memory.

drmozes 09-02-2016 12:36 PM

Quote:

Originally Posted by Linux.tar.gz (Post 5599827)
Failure :

Code:

c++: internal compiler error: Killed (program cc1plus)
I added a bit of SWAP to see if it's linked to a lack of memory.

Looks like a lack of memory indeed.

My build machines have 1GB RAM and 3GB swap.

Linux.tar.gz 09-02-2016 02:29 PM

This one had 2G RAM and zero swap. I only added 740MB swap, I'll add more if needed.
That's something I like with ARM machines: no noise, no heat, low current consumption. I can let it compile with serenity :^) .

Linux.tar.gz 09-03-2016 03:10 AM

It had indeed not enough RAM as the build went further, then stop again. New try with 9G RAM.

Linux.tar.gz 09-03-2016 05:39 PM

Failure at link, unfortunately :

[20189/20190] CXX obj/chrome/app/chrome_initial.chrome_main_delegate.o
[20190/20190] LINK chrome
FAILED: chrome
c++ -Wl,-z,now -Wl,-z,relro -Wl,--fatal-warnings -Wl,-z,defs -pthread -Wl,-z,noexecstack -fPIC -Wl,--disable-new-dtags -pie -L. -L. -Wl,--export-dynamic -pthread -Wl,--export-dynamic -pthread -Wl,-O1 -Wl,--as-needed -Wl,--gc-sections -Wl,-rpath=\$ORIGIN/lib/ -Wl,-rpath-link=lib/ -o etc.
etc.
etc.
collect2: fatal error: ld terminated with signal 9 [Killed]
compilation terminated.
ninja: build stopped: subcommand failed.
strip:/tmp/build/package-chromium/usr/lib/chromium/chromium: File format not recognized
chromium.SlackBuild FAILED at line 700

real 860m34.243s
OMAP5 dual-core Cortex-A15 1.5GHz, mSATA SSD, for the record.

Maybe lack of RAM again.
I heard once that even with a lot of swap, link can fail if not enough RAM.
Any suggestion ?

drmozes 09-04-2016 02:47 AM

Quote:

Originally Posted by Linux.tar.gz (Post 5600332)
collect2: fatal error: ld terminated with signal 9 [Killed]

dmesg will tell you what was killed and why.


All times are GMT -5. The time now is 07:25 PM.