libera/#maemo/ Wednesday, 2018-05-30

jonwilIts gotten as far as linking libxul which is a major achievement. But its asserting somewhere in LD so now I have to find the LD source code and find out why its asserting there.02:05
jonwilLets see if giving my dev VM 3.5GB of RAM (the most vmware will take) and a full 6GB of swap will help.02:20
Juestodefinitely will02:22
jonwilI will say this though, if you ever want a good way to stress test your hardware, a full compile of Firefox is a good way to do it :)02:26
Juestolol02:31
jonwilIts not using a single byte of swap but its definitely using the full 3.5GB of RAM02:34
Juestoeeh02:43
Juestojonwil: did you swapon?02:43
jonwilyes I did02:43
jonwilfree shows swap02:43
Juestooh ok02:43
jonwilIt didn't build and spat out lots of asserts but it also spat out some linker errors related to NeckoChild.o and NeckoParent.o.02:44
jonwilasserts in gnu LD I cant really do anything with, linker errors I can look into :)02:44
JuestoOh huh02:47
Juestowell maybe it's just too complex to link02:48
jonwilThe errors suggest there might be a code issue02:48
Juestodefinitely02:50
jonwilI think I fixed it now, the missing functions were in mozilla::net::WebSocketChannelChild, mozilla::net::WyciwygChannelChild, mozilla::net::WyciwygChannelParent and mozilla::net::WebSocketChannelParent. After some analysis I managed to figure out that the neko protocol list wasn't enabling websocket or wyciwyg. That's fixed now so hopefully it will link and produce a usable libxul :)04:39
brolin_empeyApparently the Motorola Droid RAZR I is an x86 smartphone with an (AMO)LED display.  It is the only x86 smartphone with an LED display I have found so far.04:47
brolin_empeysixwheeledbeast: sicelo: I used a warez copy of Sygic Mobile Maps for Maemo 5, do not remember which version of Sygic but I think I still have it in my Downloads directory.  I can find some way of getting it to you if you want it.  It was frustrating because it would not let me switch away from it while it was running even though Maemo has true multitasking.  I actually had to exit it if I needed to use a different program while it was running.  It was from04:57
brolin_empeysome time between 2010 and 2014 because that was while I used an N900.  Sygic removed references to Maemo from their Web site when Sygic discontinued the Maemo version of their product, which is a general practice I dislike.  Companies such as Adobe still provide Acrobat Reader 1 for DOS from 1994 instead of trying to brick or hide their legacy products.04:57
brolin_empeyYes, I still have it.  It is “Sygic Mobile Maps 10.16 Maemo With world Collection Of Maps-galedo” that I downloaded in 2011.05:09
KotCzarnyjonwil: if you want to stress the hw, you can also try building android07:15
KotCzarnyat one point single gcc process is using 5.6G of ram07:15
KotCzarny;)07:15
KotCzarnythat's not accounting for other processes and cache07:15
KotCzarnydarn, he is not there07:15
KotCzarnyit might've been ld though07:19
sixwheeledbeastbrolin_empey: that sounds about right chronologically. also you could switch away with the keyboard shortcuts.08:41
brolin_empeysixwheeledbeast: ACK.08:46
sixwheeledbeasttook them a while to admit they where dropping support for maemo and they would never update the maps08:48
MaxdamantusFor future reference: new polarcell battery is charged to 3.86 V out of the packaging.09:30
* Maxdamantus wonders if that's a typical voltage used for all new Li-ion batteries.09:31
bencohMaxdamantus: 3.7V is just a "nominal" average voltage09:36
bencohI doubt anyone really strive to charge batteries to 3.7V specifically before shipping09:37
bencoh+s09:37
MaxdamantusI know, just wondering if there's some typical/standard practice for voltage of shipped batteries.09:37
bencoh(same for 3.86V here)09:37
bencohah ... dunno, I'd say "relaxed"09:37
bencoh(neither empty nor full)09:37
bencoh(not fully relaxed actually)09:38
MaxdamantusThe new ones seem to have an increased charge rating too (1600 mAh rather than 1500 mAh from last time)09:39
bencohhmm09:39
Maxdamantusthough according to my N900, the last one was closer to 1600 mAh than 1500 mAh anyway.09:39
bencohmine didn't stay at 1480 max for long anyway09:39
bencohreally?09:39
MaxdamantusYeah, it consistently reported an LMD of around 1580 or so.09:40
bencohfuel gauge shows last measured discharge: 136309:40
bencohfor a 4~5yo battery09:40
Maxdamantusthough I imagine the exact amount there has more to do with the particular charge/discharge cycle than the composition of the chemicals as at the factory.09:40
MaxdamantusShould probably have looked into also getting a battery for the N97 I have while I was at it. Meh.09:43
* Maxdamantus will just break the tab off.09:49
MaxdamantusN97 probably also has the charge protection in the phone, right?09:51
KotCzarnyl/j #linux-sunxi09:55
KotCzarny3.4.113 is armbian kernel09:55
KotCzarnyeh09:55
Wizzup:p09:55
sixwheeledbeasti would also expect "relaxed" like 60% ish?10:09
sixwheeledbeastIs it the Li-ion or the Li-Po version?10:09
MaxdamantusLi-ion10:10
bencohpolarcell sells LiPo BL-5J?10:11
sixwheeledbeastIIRC could be wrong tho.10:12
MaxdamantusMy old one is Li-ion too.10:12
sixwheeledbeastYep Li-Po 1400mAh BL-5J10:20
sixwheeledbeastRed Label is Li-Po Blue is Li-ion10:20
sixwheeledbeastreduced at the moment to 9,90E10:21
KotCzarnyjonwil: if you want to stress the hw, you can also try building android. at one point ld process eats ~5.6G of ram, and that's not accounting rest of the gcc and os10:33
jonwilOuch.10:33
jonwilIt wouldn't surprise me if building chromium is also a great stress-tester given all the crap Google has in there these days10:37
jonwilAlthough I have never had any desire to build or even use Chromium so I can't comment10:37
KotCzarnyyup, that was about chromium part10:38
KotCzarnybut might be some system framework collection10:38
MaxdamantusI think ld when building Chromium on my i5-4570 already takes a few minutes.10:38
KotCzarnymaxd: having 16GB of ram helps10:40
MaxdamantusYeah, I've got 32 GiB.10:40
KotCzarnywith 8GB it thrashes caches so has to reload things many times10:40
KotCzarnyhave fun on 4GB10:40
jonwilI would love to be able to upgrade to 16GB on my system (currently got 8GB)10:40
KotCzarnyone time i've tried it, it took ~50 minutes10:40
KotCzarnybecause of all the swapping10:40
MaxdamantusI don't think it would've been causing my system to put things in swap.10:41
Maxdamantusthough I suspect the filesystem accesses would've been a slow point.10:41
jonwilHaving an SSD is a great way to boost the speed of file I/O on big compiles10:41
* Maxdamantus only started using an SSD on his main computer a couple of months ago.10:41
* Maxdamantus hasn't used Chromium since longer ago than that.10:41
jonwilAlthough I dont have room on my SSD for my vmware image file so it has to sit on my hard disk instead.10:42
jonwilSadly RAM prices are far too high right now for a 16GB upgrade to happen (mostly thanks to illegal cartel conduct by the RAM producers and governments unwilling or unable to actually force the RAM producers to stop ripping everyone off)10:42
MaxdamantusSize  Used Avail Use% Mounted on; 19T   11T  7.3T  60% /btrfs-hd; 900G  292G  606G  33% /btrfs10:43
* Maxdamantus probably has enough space to try things.10:43
KotCzarnyjonwil: with 32GB you can just put whole compile tree in tmpfs10:43
KotCzarnyand just snapshot back to hdd when done10:43
jonwilI feel sorry for anyone trying to build a new PC right now with the high prices of various components.10:44
KotCzarnybuy a board that accepts 8 or more ram modules?10:44
KotCzarny:)10:45
KotCzarnyolder sticks are cheap10:45
jonwilThere aren't that many motherboards out there that can take a Skylake Core i5 chip AND use old cheap RAM. My current board (only a fairly recent upgrade) uses DDR4.10:46
jonwilAnyhow, time to run this build and see if libxul can link or not (now that I have hopefully fixed the problem causing the it to spit out errors about missing websocket and wyciwyg functions it should now link I hope)10:48
jonwilI just hope the assertions I am seeing from LD dont mean the build is failing (although if they were the kind of thing that would result in a failed build or broken output, it wouldn't make sense for the build to continue after encountering such an assertion I would have thought)10:50
KotCzarnyjonwil, from my past experiences with ff build, it's very picky about what you enable or not10:52
KotCzarnyso just might need magic build config to succeed10:52
jonwilYeah I discovered that turning off websockets and wyciwyg in the necko protocols list causes the link of libxul to fail.10:52
jonwilSo I fixed that and hopefully this time it will link.10:53
KotCzarnywebsockets is important in current internet2.010:57
KotCzarnyhalf of those interactive sites require it to work10:58
jonwilIn other news I may need to port TLS 1.2 support to the Fremantle version of QT (which means I need a newer OpenSSL as well) since the backend I am using for the local transit agency in Fahrplan seems to have upgraded to be TLS 1.2 only.11:00
jonwilI will know for sure once my phone finishes charging and I can get Fahrplan into the debugger11:00
jonwilOne useful thing I found is a portable Windows build of Firefox 24ESR which I can test sites with11:02
jonwilMeaning I can figure out if a site will or wont work in the FF24-based microb-engine hopefully (it wont be a perfect test but its still fairly close)11:03
jonwilAnd most of the sites I can't get working on current microb do seem to work.11:03
MaxdamantusDoes that Firefox build actually use some bundled OpenSSL rather than something provided by Windows?11:05
jonwilWhat do you mean?11:05
Wizzupfirefox does not use openssl11:06
Wizzupit uses nss11:06
jonwilYeah it does11:06
jonwilQT uses OpenSSL though11:06
MaxdamantusI'm not really familiar with NSS, but my understanding was that it's meant to be some portability layer.11:07
Maxdamantusnot a complete implementation of SSL/TLS11:08
Maxdamantuslooking an /proc/*/maps on my main system, I can see that Firefox has references to libcrypt.11:08
Maxdamantuslibcrypto*11:08
MaxdamantusHm, guess I'm mistaken.11:13
Wizzuplibcrypto is part of openssl11:14
MaxdamantusYes, but Firefox is using it for something.11:14
Wizzupcould be nss using it? anyway, I don't know 100% either ;)11:14
Maxdamantusbut looking through the source of NSS, it seems to at least implement a bunch of some sort of logic in SSL that would probably also be implemented in OpenSSL.11:15
Maxdamantusmaybe it just uses libcrypto for implementations of the underlying cryptographic algorithms.11:15
jonwilNope, NSS is a full implementation of all the crypto11:17
jonwiland has no dependencies on OpenSSL in any way11:17
jonwilnss does contain a libssl3.so file (at least the one in microb-engine does) but that's unrelated to the libssl.so file of OpenSSL11:19
MaxdamantusMy instance has libcrypto itself (from openssl) mapped, though I imagine it could just be from another library it depends on.11:22
MaxdamantusYeah, comes from libevent.11:24
Maxdamantus$ cat /proc/3594/maps | sed 's/^.*   //' | sort | uniq | while read -r x; do [ -f "$x" ] && echo "$x"; done | fgrep .so | while read x; do out="$(ldd "$x")"; grep -q libcrypto <<< "$out" && echo "$(wc -l <<< "$out") $x"; done11:24
* Maxdamantus though `ldd` had some tree view, but can't seem to find it.11:24
jonwilLooks like I need TLS 1.2 support in Maemo QT (and a newer OpenSSL) if I want to keep my transit app working since they changed the backend and it now mandates TLS 1.2.12:09
jonwilIn the mean time my build of Gecko is still going without any problems.12:16
jonwilNow linking libxul, fingers crossed that it works with no errors...12:31
jonwilIT WORKED12:32
jonwilI now have a libxul.so file :)12:32
jonwilNow I just need to figure out what needs changing in the packaging and this thing will hopefully give me a set of deb files.12:57
KotCzarnytry running it first on device13:05
jonwilI can't try it because I probably need to install the new -dev packages then rebuild some other packages and see if the API has changed (which it probably has)13:10
KotCzarnyfor now just copy libs to the same dir as binary and use export LD_LIBRARY_PATH=. trick13:11
KotCzarnythat way you will know if it runs and how fast ;)13:11
jonwilLets start with the xulrunner binary it gave me13:14
jonwilsee if that even runs13:15
jonwilwhich will tell me if I have a working binary or not13:15
KotCzarnyas for packaging, you can probably steal fennec's one13:17
jonwilWith libxul.so at almost 1gb in size, I am not liking the chances of this thing actually working13:19
jonwilThat's probably unstripped though13:20
jonwilwhich makes sense13:20
jonwilLets strip them before I copy them to the device13:23
KotCzarnystrip -g13:25
KotCzarnyon the libs13:25
KotCzarnyand normal strip on binary13:25
jonwilyeah I know.13:25
KotCzarny:)13:25
KotCzarnyand next time change -O2 -g into -O2 -s when building13:26
KotCzarnyalso, did you enable thumb?13:26
jonwilnope, I am not using thumb at all13:26
jonwilsince I dont have the thumb kernel and I dont want it13:26
KotCzarnywith firefox and contrained by limited memory, you should, once you have working one13:27
jonwillibxul.so goes down to 53mb after the strip13:29
jonwilmuch better13:29
jonwilNow I need to install the newer libstdc++13:33
KotCzarnyjust bundle it for the test run13:41
jonwilI got the xulrunner binary that was built as part of the FF build to work13:57
jonwilAnd I can actually see websites with it(!)13:58
jonwilSo I would say that we have a working browser13:58
jonwilIt does not work if I try to run anything on the system that uses libxul though (in fact doing so crashed the phone and now I have to use rescueos to move the files I backed up back in place and get my phone to boot again)14:04
Wizzupyes, now comes the fun part14:05
KotCzarnytold you to use local libs dir instead of destroying the system14:05
jonwilIts not possible to use local libs for gecko because of how gecko finds its libs14:06
jonwilits an easy fix though thanks to rescueos14:08
MaxdamantusSurely LD_PRELOAD should at least work, right?14:09
jonwilIts not that simple14:13
jonwilIn any case I know libgtkmozembed and the other bits just aren't going to work yet14:14
jonwilSo the plan is to fix the packaging and go from there14:14
jonwilThe most important thing is that I have a working web browser on the N900 that uses the Firefox 24.8.1 engine.14:15
jonwilLets see what happens when I try to load a TLS 1.2 web site on the device.14:17
KotCzarnydid you measure memory usage compared to other browser?14:17
Wizzupjonwil: but this is not microb, right, so it's just fennec with different ui?14:20
jonwilThis is xulrunner (as built with the Firefox tree) with the sample browser from https://github.com/matthewkastor/XULRunner-Examples14:21
jonwilThe aim once I get things to actually work is to replace microb-engine14:21
jonwilRight now I just want to see how well the Gecko I built actually works14:22
MaxdamantusPersonally, I would use conkeror over microb, but opera still seems a lot more responsive than those.14:24
Maxdamantusbut recently I've found I can't access github through that anymore.14:24
* Maxdamantus has just looked through things on github using edbrowse a couple of times.14:25
Maxdamantusbtw, conkeror is also very easy to test; just clone/check out the repository, then `xulrunner application.ini`14:27
Maxdamantus1264c0dbbefb6d671504a072d4ddb48d62ccead214:28
jonwilSites that don't work at all (due to TLS 1.1/1.2 only) on microb do work in this browser14:28
Maxdamantus^ that commit pretty much works with microb-xulrunner14:28
jonwiloh crap, my dev VM is running low on disk space. Not good, especially since the drive its on is also running low on disk space14:36
KotCzarnyjonwil: told you, change build flags14:38
KotCzarnyfrom -O2 -g to -O2 -s14:38
KotCzarnywill save you few gigs14:38
jonwilI have a total of ~1tb of disk across 3 drives yet I only have a total of ~66gb free across those 3 drives.14:42
jonwilI think I need to give my disks a good cleanout14:42
bencohjonwil: i kinda forgot, but why 24.x?14:42
jonwil24 is the first version with TLS `1.2 (a necessary feature) and it pre-dates the complete removal of Maemo support14:43
jonwiland its an ESR release (the last one before the Maemo support disappeared)14:43
jonwilThat's why its the best candidate14:43
bencohmaemo support from mozilla you mean?14:43
bencohor from nokia?14:43
jonwilYes14:44
bencohyes to?14:44
jonwilThe maemo bits in the Gecko tree14:44
bencohah14:44
bencohI see14:44
jonwilThere is a removal bug matching FF2614:44
* Maxdamantus has a total of 21 TB of disk across 4 drives with ~8 TB free14:44
bencohWell, I guess ff24 would be goodenough(tm) anyway14:44
jonwilI wish I could afford computer bits but I can't :(14:45
jonwilI would love to replace the 256GB SSD I use as my main drive with something bigger (or add a second SSD) but I cant afford it.14:45
jonwilNor can I afford the RAM or GPU upgrades I want either14:45
jonwilIt doesn't help that so much output for RAM and Flash chips and things is going into mobile devices so that all the sheeple can have the latest crApple iFail which is one thing pushing up the price of the bits I want14:47
jonwilconkeror runs btw14:50
jonwilSeems to be working too14:50
Maxdamantusand in case you want touch panning for it, here's my ~/.conkerorrc I hacked together a few years ago: https://gist.github.com/Maxdamantus/0aefa2c713afda4af04abdbb3a97ca8914:53
jonwilSlow as molasses though with top telling me its using 86.9% CPU14:53
jonwilAnd it looks to be built with -O2 so its definitely not an unoptimised build14:57
jonwilAnyhow, at least I know FF24 DOES run on the N90014:59
Wizzupfirefox 52 also does :)15:00
jonwilBut I suspect FF52 would be even bigger and slower than FF24 and wouldn't have any of the Maemo support bits needed to e.g. be able to click on a phone number and have it open the phone dialer15:04
MaxdamantusI'm sure that can be reimplemented easily enough.15:16
Maxdamantusthe rtcom-messaging-ui stuff involves some HTML/JS which can be directly modified.15:17
bencohmmmh15:18
bencohMaxdamantus: you probably don't want to play around the browser EAL too much15:19
MaxdamantusI modified them a while ago because I hated the default layout of messages.15:19
bencohyeah but that's the easy part15:19
MaxdamantusWell, it should pretty much be the same part.15:20
Maxdamantusbecause iirc the modifications I made involved handling the text messages in JS.15:20
Maxdamantusso if I wanted to I could manipulate those messages in arbitrary ways to figure out what to insert into the DOM.15:21
jonwilMy ultimate goal is still ideally to replace microb-engine15:21
Maxdamantushttp://maxdamantus.eu.org/rmu.png15:23
Maxdamantusiirc the default view had bad handling of timestamps, and put things in big bubbles where you had to use the padding on the left to identify incoming/outgoing.15:24
bencohMaxdamantus: wow, it basically looks just like what I wanted to do back then15:25
bencoh(but eventually settled for something hackish and ugly)15:25
Maxdamantusanyway, sleep15:25
bencoh'night15:26
bencohI guess I'll have to bother you about timestamps handling :)15:26
* Maxdamantus needs to figure out sometime how to make the top menu not so pointlessly huge.15:26
Maxdamantushildon status bar thing15:26
jonwilIt wouldn't surprise me if there are options I can turn off or on that would have benefits on memory usage and performance15:26
bencohyou might be able to "configure" jemalloc15:38
bencoh(assuming it's still the mem allocator used by mozilla)15:39
jonwilSomehow I dont think running FF24 and its rendering engine on a device with only 256mb of RAM is something that the Mozilla guys would call "sane"15:46
bencohhuhu15:48
bencoh:)15:48
jonwilI managed to get microb-refui TestGtkEmbed from the current CSSU microb-engine to actually run and load my rebuilt libxul.so without replacing any system files. It fails with a "Couldn't start XPCOM" error but its a start.17:22
KotCzarnyi suspect microb has patched xul versin17:22
KotCzarnycheck microb package for patches?17:23
jonwilI already know microb has a lot of local patches17:23
KotCzarnybut xul related17:23
jonwilI bet its simply the case that the xpcom bits linked into TestGtkEmbed dont match the xpcom bits linked into libxul.so because much has changed between 1.9.2 and 24.8.117:24
KotCzarnyrebuild microb with proper headers?17:24
jonwilI think we need to bring back the gtkmozembed stuff removed in mozilla bug 64815617:26
jonwilThat's gotta be one of the next steps I suspect17:26
jonwilWith that we can probably get a TestGtkEmbed built with FF24 code17:26
jonwilThe key thing so far is that libxul works and can browse the web when used with xulrunner and conkeror17:27
bencohon-device as well?17:29
bencoh(or sdk only?)17:29
jonwilYep17:29
jonwilon-device17:29
bencohneat17:29
jonwilconkeror works on device17:29
bencohI wonder how much ram it eats17:30
bencohhmm, I wonder if we could benefit from a better JS JIT17:30
KotCzarnyas long it doesnt trade mem usage for performance17:31
KotCzarnywhich might be the case17:31
jonwilAccording to https://blog.mozilla.org/javascript/2012/09/12/ionmonkey-in-firefox-18/ we do get a much better JIT than the one in microb-engine17:50
jonwilAnyhow, its definitely "AM" here (to quote Apollo 13 "AM, very, very AM") which means its time to stop for now and resume later :)17:51
jonwilcya :)17:51

Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!