New issue
Advanced search Search tips

Issue 802091 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug

Blocking:
issue 724628



Sign in to add a comment

platform_AddPrinter test fails on ARM with libc++

Project Member Reported by manojgupta@chromium.org, Jan 15 2018

Issue description

platform_AddPrinter test is failing on ARM boards when libc++ is enabled. 
This test was in bvt-perbuild and is only recently moved to bvt-cq.

https://uberchromegw.corp.google.com/i/chromiumos.tryserver/builders/llvm_toolchain/builds/711

01/14 19:27:19.664 INFO |      fake_printer:0028| waiting for a printing request
01/14 19:27:19.705 DEBUG|              test:0379| Starting before_iteration_hooks for platform_AddPrinter
01/14 19:27:19.707 DEBUG|      base_sysinfo:0175| Loggable runs cmd: /opt/google/chrome/chrome --version
01/14 19:27:19.708 DEBUG|      global_hooks:0056| '/opt/google/chrome/chrome --version'
01/14 19:27:19.802 DEBUG|      base_sysinfo:0124| Loggable saves logs to /usr/local/autotest/results/default/platform_AddPrinter/sysinfo/iteration.1/interrupts.before
01/14 19:27:19.804 DEBUG|      base_sysinfo:0124| Loggable saves logs to /usr/local/autotest/results/default/platform_AddPrinter/sysinfo/iteration.1/schedstat.before
01/14 19:27:19.806 DEBUG|      base_sysinfo:0124| Loggable saves logs to /usr/local/autotest/results/default/platform_AddPrinter/sysinfo/iteration.1/meminfo.before
01/14 19:27:19.808 DEBUG|      base_sysinfo:0124| Loggable saves logs to /usr/local/autotest/results/default/platform_AddPrinter/sysinfo/iteration.1/slabinfo.before
01/14 19:27:19.827 DEBUG|      global_hooks:0056| 'ls /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_max_freq'
01/14 19:27:19.858 INFO |      base_sysinfo:0395| ChromeOS BOARD = peach_pit_1.9GHz_3GB
01/14 19:27:19.860 DEBUG|             utils:0214| Running 'logger "autotest starting iteration /usr/local/autotest/results/default/platform_AddPrinter/sysinfo/iteration.1 on peach_pit_1.9GHz_3GB"'
01/14 19:27:19.861 DEBUG|      global_hooks:0056| 'logger "autotest starting iteration /usr/local/autotest/results/default/platform_AddPrinter/sysinfo/iteration.1 on peach_pit_1.9GHz_3GB"'
01/14 19:27:19.885 DEBUG|              test:0384| before_iteration_hooks completed
01/14 19:27:19.886 DEBUG|              test:0399| starting test(run_once()), test details follow
()
01/14 19:27:19.888 INFO |platform_AddPrinte:0111| add printer from ppd:/tmp/GenericPostScript.ppd.gz
01/14 19:27:20.357 DEBUG|             utils:0214| Running 'lp -d FakePrinterID /usr/local/autotest/tests/platform_AddPrinter/to_print.pdf'
01/14 19:27:20.358 DEBUG|      global_hooks:0056| 'lp -d FakePrinterID /usr/local/autotest/tests/platform_AddPrinter/to_print.pdf'
01/14 19:27:30.422 DEBUG|             utils:0214| Running 'cmp /tmp/printing_request.log /usr/local/autotest/tests/platform_AddPrinter/golden_printing_request_generic.bin'
01/14 19:27:30.426 DEBUG|      global_hooks:0056| 'cmp /tmp/printing_request.log /usr/local/autotest/tests/platform_AddPrinter/golden_printing_request_generic.bin'
01/14 19:27:30.463 DEBUG|              test:0410| Test failed due to Command <cmp /tmp/printing_request.log /usr/local/autotest/tests/platform_AddPrinter/golden_printing_request_generic.bin> failed, rc=2, Command returned non-zero exit status
* Command: 
    cmp /tmp/printing_request.log /usr/local/autotest/tests/platform_AddPrint
    er/golden_printing_request_generic.bin
Exit status: 2
Duration: 0.00593400001526

stderr:
cmp: /tmp/printing_request.log: No such file or directory. Exception log follows the after_iteration_hooks.
01/14 19:27:30.465 DEBUG|              test:0415| Starting after_iteration_hooks for platform_AddPrinter
01/14 19:27:30.469 DEBUG|      base_sysinfo:0124| Loggable saves logs to /usr/local/autotest/results/default/platform_AddPrinter/sysinfo/iteration.1/interrupts.after
01/14 19:27:30.471 DEBUG|             utils:0214| Running 'mkdir -p /usr/local/autotest/results/default/platform_AddPrinter/sysinfo/iteration.1/var/spool'
01/14 19:27:30.473 DEBUG|      global_hooks:0056| 'mkdir -p /usr/local/autotest/results/default/platform_AddPrinter/sysinfo/iteration.1/var/spool'
01/14 19:27:30.507 DEBUG|             utils:0214| Running 'rsync --no-perms --chmod=ugo+r -a --safe-links --exclude=/crash/**autoserv* --exclude=/crash/*.core /var/spool/crash /usr/local/autotest/results/default/platform_AddPrinter/sysinfo/iteration.1/var/spool'
01/14 19:27:30.510 DEBUG|      global_hooks:0056| 'rsync --no-perms --chmod=ugo+r -a --safe-links --exclude=/crash/**autoserv* --exclude=/crash/*.core /var/spool/crash /usr/local/autotest/results/default/platform_AddPrinter/sysinfo/iteration.1/var/spool'
01/14 19:27:30.556 DEBUG|             utils:0214| Running 'rm -rf /var/spool/crash/*'
01/14 19:27:30.558 DEBUG|      global_hooks:0056| 'rm -rf /var/spool/crash/*'
01/14 19:27:30.587 DEBUG|      base_sysinfo:0124| Loggable saves logs to /usr/local/autotest/results/default/platform_AddPrinter/sysinfo/iteration.1/meminfo.after
01/14 19:27:30.590 DEBUG|      base_sysinfo:0124| Loggable saves logs to /usr/local/autotest/results/default/platform_AddPrinter/sysinfo/iteration.1/slabinfo.after
01/14 19:27:30.591 DEBUG|      base_sysinfo:0124| Loggable saves logs to /usr/local/autotest/results/default/platform_AddPrinter/sysinfo/iteration.1/schedstat.after
01/14 19:27:30.592 DEBUG|             utils:0214| Running 'logger "autotest finished iteration /usr/local/autotest/results/default/platform_AddPrinter/sysinfo/iteration.1"'
01/14 19:27:30.593 DEBUG|      global_hooks:0056| 'logger "autotest finished iteration /usr/local/autotest/results/default/platform_AddPrinter/sysinfo/iteration.1"'
01/14 19:27:30.615 DEBUG|              test:0420| after_iteration_hooks completed
01/14 19:27:30.617 WARNI|              test:0637| The test failed with the following exception
Traceback (most recent call last):
  File "/usr/local/autotest/common_lib/test.py", line 631, in _exec
    _call_test_function(self.execute, *p_args, **p_dargs)
  File "/usr/local/autotest/common_lib/test.py", line 831, in _call_test_function
    return func(*args, **dargs)
  File "/usr/local/autotest/common_lib/test.py", line 495, in execute
    dargs)
  File "/usr/local/autotest/common_lib/test.py", line 362, in _call_run_once_with_retry
    postprocess_profiled_run, args, dargs)
  File "/usr/local/autotest/common_lib/test.py", line 400, in _call_run_once
    self.run_once(*args, **dargs)
  File "/usr/local/autotest/tests/platform_AddPrinter/platform_AddPrinter.py", line 174, in run_once
    self.print_a_page(os.path.join(current_dir, golden_file));
  File "/usr/local/autotest/tests/platform_AddPrinter/platform_AddPrinter.py", line 141, in print_a_page
    'cmp %s %s' % (self.printing_log_path, golden_file_path)
  File "/usr/local/autotest/common_lib/utils.py", line 1056, in system_output
    args=args).stdout
  File "/usr/local/autotest/common_lib/utils.py", line 748, in run
    "Command returned non-zero exit status")
CmdError: Command <cmp /tmp/printing_request.log /usr/local/autotest/tests/platform_AddPrinter/golden_printing_request_generic.bin> failed, rc=2, Command returned non-zero exit status
* Command: 
    cmp /tmp/printing_request.log /usr/local/autotest/tests/platform_AddPrint
    er/golden_printing_request_generic.bin
Exit status: 2
Duration: 0.00593400001526

stderr:
cmp: /tmp/printing_request.log: No such file or directory
01/14 19:27:30.649 DEBUG|              test:0642| Running cleanup for test.
01/14 19:27:30.651 DEBUG|      global_hooks:0056| ['sh', '-c', '/bin/ps --no-headers -A -o pid,ppid,args:4096,state']
01/14 19:27:30.715 DEBUG|    cros_interface:0367| ListProcesses(<predicate>)->[198 processes]
01/14 19:27:30.718 DEBUG|      global_hooks:0056| ['sh', '-c', '/bin/ps --no-headers -A -o pid,ppid,args:4096,state']
01/14 19:27:30.769 DEBUG|    cros_interface:0367| ListProcesses(<predicate>)->[198 processes]
01/14 19:27:30.771 INFO |           browser:0210| Closing browser (pid=26318) ...
01/14 19:27:30.774 INFO |    cros_interface:0564| (Re)starting the ui (logs the user out)
01/14 19:27:30.776 DEBUG|      global_hooks:0056| ['sh', '-c', 'systemctl']
01/14 19:27:30.790 DEBUG|      global_hooks:0056| ['sh', '-c', 'systemctl']
01/14 19:27:30.805 DEBUG|      global_hooks:0056| ['sh', '-c', 'status ui']
01/14 19:27:30.825 DEBUG|    cros_interface:0443| IsServiceRunning(ui)->True
01/14 19:27:30.826 DEBUG|    cros_interface:0058| sh -c restart ui 
01/14 19:27:30.827 DEBUG|      global_hooks:0056| ['sh', '-c', 'restart ui']
01/14 19:27:32.793 DEBUG|    cros_interface:0067|  > stdout=[ui start/running, process 27149
], stderr=[]
01/14 19:27:32.794 DEBUG|    cros_interface:0058| sh -c cryptohome-path user 'crosautotest@gmail.com' 
01/14 19:27:32.795 DEBUG|      global_hooks:0056| ['sh', '-c', "cryptohome-path user 'crosautotest@gmail.com'"]
01/14 19:27:32.828 DEBUG|    cros_interface:0067|  > stdout=[/home/user/33b2c75959a4d16ee7409f1cafbe08c1d5a4e02a
], stderr=[]
01/14 19:27:32.830 DEBUG|    cros_interface:0058| sh -c /bin/df --output=source,target /run/cryptohome/ephemeral_mount/33b2c75959a4d16ee7409f1cafbe08c1d5a4e02a 
01/14 19:27:32.831 DEBUG|      global_hooks:0056| ['sh', '-c', '/bin/df --output=source,target /run/cryptohome/ephemeral_mount/33b2c75959a4d16ee7409f1cafbe08c1d5a4e02a']
01/14 19:27:32.851 DEBUG|    cros_interface:0067|  > stdout=[], stderr=[df: /run/cryptohome/ephemeral_mount/33b2c75959a4d16ee7409f1cafbe08c1d5a4e02a: No such file or directory
]
01/14 19:27:32.853 DEBUG|    cros_interface:0058| sh -c cryptohome-path user 'crosautotest@gmail.com' 
01/14 19:27:32.854 DEBUG|      global_hooks:0056| ['sh', '-c', "cryptohome-path user 'crosautotest@gmail.com'"]
01/14 19:27:32.884 DEBUG|    cros_interface:0067|  > stdout=[/home/user/33b2c75959a4d16ee7409f1cafbe08c1d5a4e02a
], stderr=[]
01/14 19:27:32.886 DEBUG|    cros_interface:0058| sh -c /bin/df --output=source,target /home/user/33b2c75959a4d16ee7409f1cafbe08c1d5a4e02a 
01/14 19:27:32.887 DEBUG|      global_hooks:0056| ['sh', '-c', '/bin/df --output=source,target /home/user/33b2c75959a4d16ee7409f1cafbe08c1d5a4e02a']
01/14 19:27:32.908 DEBUG|    cros_interface:0067|  > stdout=[Filesystem     Mounted on
/dev/mmcblk0p1 /home
], stderr=[]
01/14 19:27:32.910 INFO |           browser:0224| Browser is closed.
01/14 19:27:32.912 ERROR|              test:0645| Ignoring exception during cleanup() phase:
01/14 19:27:32.927 ERROR|         traceback:0013| Traceback (most recent call last):
01/14 19:27:32.943 ERROR|         traceback:0013|   File "/usr/local/autotest/common_lib/test.py", line 643, in _exec
01/14 19:27:32.959 ERROR|         traceback:0013|     _cherry_pick_call(self.cleanup, *args, **dargs)
01/14 19:27:32.974 ERROR|         traceback:0013|   File "/usr/local/autotest/common_lib/test.py", line 746, in _cherry_pick_call
01/14 19:27:32.990 ERROR|         traceback:0013|     return func(*p_args, **p_dargs)
01/14 19:27:33.004 ERROR|         traceback:0013|   File "/usr/local/autotest/tests/platform_AddPrinter/platform_AddPrinter.py", line 80, in cleanup
01/14 19:27:33.019 ERROR|         traceback:0013|     os.remove(self.printing_log_path)
01/14 19:27:33.034 ERROR|         traceback:0013| OSError: [Errno 2] No such file or directory: '/tmp/printing_request.log'
01/14 19:27:33.047 ERROR|              test:0649| Now raising the earlier <class 'autotest_lib.client.common_lib.error.CmdError'> error
01/14 19:27:33.062 DEBUG|   logging_manager:0627| Logging subprocess finished
01/14 19:27:33.069 DEBUG|   logging_manager:0627| Logging subprocess finished
 
kalin@, xiaochu@ logs show that you have been active with the platform_AddPrinter test. Can you take a look at the logs and check the failure root cause?

Comment 2 by ka...@chromium.org, Jan 16 2018

Cc: manojgupta@chromium.org
Components: Internals>Printing>CUPS
Labels: -Pri-2 Pri-1
+skau@, P1

Comment 3 by ka...@chromium.org, Jan 16 2018

Cc: skau@chromium.org
libc++ is not deployed yet. So the failure may not be reproduced on canaries.

To remotely build an image with libc++ enabled with latest toolchain:
$ cros tryjob -g 509896 --latest-toolchain peach_pit-release-tryjob
Or just use the image at: https://uberchromegw.corp.google.com/i/chromiumos.tryserver/builders/llvm_toolchain/builds/711

Thanks for any help in root causing the issue.


Comment 5 by ka...@chromium.org, Jan 16 2018

The test was moved at R65-10283.0.0 after stabilized on bvt-perbuild.
I see few instances (for last 15 days) this failure happening for quawks, and veyron_mighty.
Is this a consistent failure?

Comment 6 by ka...@chromium.org, Jan 16 2018

suite testhealth dashboard - https://screenshot.googleplex.com/Tz2WTN6JOxv
I see failures only when building ChromeOS with libc++ instead of libstdc++ as detailed in #4. We want to deploy libc++ and this failure is a blocker for the deployment.

From #6, I suspect that the test may have some flakiness but it fails consistently with libc++ enabled. Is there a way to root cause the failure from the logs at https://uberchromegw.corp.google.com/i/chromiumos.tryserver/builders/llvm_toolchain/builds/711 ?
The test failed seems to be platform_AddPrinter.generic which tests CUPS printing stack. 

From the logs I can see:

01/14 19:27:19.888 INFO |platform_AddPrinte:0111| add printer from ppd:/tmp/GenericPostScript.ppd.gz
01/14 19:27:20.357 DEBUG|             utils:0214| Running 'lp -d FakePrinterID /usr/local/autotest/tests/platform_AddPrinter/to_print.pdf'
01/14 19:27:20.358 DEBUG|      global_hooks:0056| 'lp -d FakePrinterID /usr/local/autotest/tests/platform_AddPrinter/to_print.pdf'
01/14 19:27:30.422 DEBUG|             utils:0214| Running 'cmp /tmp/printing_request.log /usr/local/autotest/tests/platform_AddPrinter/golden_printing_request_generic.bin'
01/14 19:27:30.426 DEBUG|      global_hooks:0056| 'cmp /tmp/printing_request.log /usr/local/autotest/tests/platform_AddPrinter/golden_printing_request_generic.bin'
01/14 19:27:30.463 DEBUG|              test:0410| Test failed due to Command <cmp /tmp/printing_request.log 

It means the printing request was sent but the printing is not finished for some reason. Then in /var/lib/messages: 

2018-01-15T03:27:20.403423+00:00 NOTICE cupsd[26848]: [Job 1] 2 filters for job:
2018-01-15T03:27:20.403543+00:00 NOTICE cupsd[26848]: [Job 1] pdftopdf (application/pdf to application/vnd.cups-pdf, cost 66)
2018-01-15T03:27:20.403572+00:00 NOTICE cupsd[26848]: [Job 1] foomatic-rip (application/vnd.cups-pdf to printer/FakePrinterID, cost 0)
2018-01-15T03:27:20.404743+00:00 NOTICE cupsd[26848]: [Job 1] Started filter /usr/libexec/cups/filter/pdftopdf (finishings=3 number-up=1 job-uuid=urn:uuid:805f4399-e028-3bea-6492-5b8cadde3ed2 job-originating-host-name=localhost date-time-at-creation= date-time-at-processing= time-at-creation=1515986840 time-at-processing=1515986840 document-name-supplied=to_print.pdf) (PID 2)
2018-01-15T03:27:20.405818+00:00 NOTICE cupsd[26848]: [Job 1] Started filter /usr/libexec/cups/filter/foomatic-rip (finishings=3 number-up=1 job-uuid=urn:uuid:805f4399-e028-3bea-6492-5b8cadde3ed2 job-originating-host-name=localhost date-time-at-creation= date-time-at-processing= time-at-creation=1515986840 time-at-processing=1515986840 document-name-supplied=to_print.pdf) (PID 3)
2018-01-15T03:27:20.406722+00:00 NOTICE cupsd[26848]: [Job 1] Started backend /usr/libexec/cups/backend/socket (PID 4)
2018-01-15T03:27:20.407150+00:00 INFO cupsd[26848]: REQUEST localhost - - "POST /printers/FakePrinterID HTTP/1.1" 200 15970 Send-Document successful-ok
2018-01-15T03:27:20.469567+00:00 INFO crash_reporter[26911]: libminijail[26911]: mount /dev/log -> /dev/log type ''
2018-01-15T03:27:20.535263+00:00 INFO session_manager[26258]: [INFO:child_exit_handler.cc(77)] Handling 26849 exit.
2018-01-15T03:27:20.544090+00:00 WARNING crash_reporter[26911]: [user] Received crash notification for pdftopdf[26896] sig 31, user 277 (developer build - not testing - always dumping)
2018-01-15T03:27:20.548870+00:00 INFO crash_reporter[26911]: State of crashed process [26896]: S (sleeping)
2018-01-15T03:27:20.577164+00:00 INFO crash_reporter[26911]: Stored minidump to /var/spool/crash/pdftopdf.20180114.192720.26896.dmp
2018-01-15T03:27:20.577790+00:00 INFO crash_reporter[26911]: Leaving core file at /var/spool/crash/pdftopdf.20180114.192720.26896.core due to developer image
2018-01-15T03:27:20.580552+00:00 NOTICE cupsd[26848]: [Job 1] PID 2 (/usr/libexec/cups/filter/pdftopdf) crashed on signal 31.
2018-01-15T03:27:20.581589+00:00 NOTICE cupsd[26848]: [Job 1] PID 3 (/usr/libexec/cups/filter/foomatic-rip) stopped with status 2.

Two cups filter crashed. I guess to find the root cause, you need to examine the crash dump to start.

Comment 9 by skau@chromium.org, Jan 16 2018

It's probably an issue with minijail and the syscall names changing. I'll
take a look in the morning.

Comment 10 by skau@chromium.org, Jan 17 2018

signal 31 definitely means that pdftopdf is failing due to seccomp.  Is the libc++ change landed?
We want to land libc++ change early next week after branch point. So to answer #10, It is not landed yet.

Comment 12 by skau@chromium.org, Jan 17 2018

Can you link me a CL I should patch to diagnose?  I don't get seccomp logs given the way the test runs.

Comment 13 by skau@chromium.org, Jan 18 2018

This seems to be the problem.

/usr/libexec/cups/filter/pdftopdf: symbol lookup error: /usr/lib/libqpdf.so.13: undefined symbol: __aeabi_uldivmod

Comment 14 by skau@chromium.org, Jan 18 2018

Looks like it's from libgcc?  I'll see if it's referenced directly in the library.
we do not use libgcc in ChromeOS but use compiler-rt now. Nevertheless, it is surprising that the symbol is missing and linker didn't complain when building qpdf. 
Let me see if forcing qpdf to libgcc fixes the problem.
Looks like qpdf is using  "-nostdlib" while linking. This is causing some symbols to be missing.

libtool: link: armv7a-cros-linux-gnueabi-clang++  -fPIC -DPIC -shared -nostdlib /build/kevin/usr/lib/../lib/crti.o /usr/bin/../lib/gcc/armv7a-cros-linux-gnueabi/4.9.x/crtbeginS.o  libqpdf/build/.libs/BitStream.o libqpdf/build/.libs/BitWriter.o libqpdf/build/.libs/Buffer.o libqpdf/build/.libs/BufferInputSource.o libqpdf/build/.libs/FileInputSource.o libqpdf/build/.libs/InputSource.o libqpdf/build/.libs/InsecureRandomDataProvider.o libqpdf/build/.libs/MD5.o libqpdf/build/.libs/OffsetInputSource.o libqpdf/build/.libs/PCRE.o libqpdf/build/.libs/Pipeline.o libqpdf/build/.libs/Pl_AES_PDF.o libqpdf/build/.libs/Pl_ASCII85Decoder.o libqpdf/build/.libs/Pl_ASCIIHexDecoder.o libqpdf/build/.libs/Pl_Buffer.o libqpdf/build/.libs/Pl_Concatenate.o libqpdf/build/.libs/Pl_Count.o libqpdf/build/.libs/Pl_Discard.o libqpdf/build/.libs/Pl_Flate.o libqpdf/build/.libs/Pl_LZWDecoder.o libqpdf/build/.libs/Pl_MD5.o libqpdf/build/.libs/Pl_PNGFilter.o libqpdf/build/.libs/Pl_QPDFTokenizer.o libqpdf/build/.libs/Pl_RC4.o libqpdf/build/.libs/Pl_SHA2.o libqpdf/build/.libs/Pl_StdioFile.o libqpdf/build/.libs/QPDF.o libqpdf/build/.libs/QPDFExc.o libqpdf/build/.libs/QPDFObjGen.o libqpdf/build/.libs/QPDFObject.o libqpdf/build/.libs/QPDFObjectHandle.o libqpdf/build/.libs/QPDFTokenizer.o libqpdf/build/.libs/QPDFWriter.o libqpdf/build/.libs/QPDFXRefEntry.o libqpdf/build/.libs/QPDF_Array.o libqpdf/build/.libs/QPDF_Bool.o libqpdf/build/.libs/QPDF_Dictionary.o libqpdf/build/.libs/QPDF_InlineImage.o libqpdf/build/.libs/QPDF_Integer.o libqpdf/build/.libs/QPDF_Name.o libqpdf/build/.libs/QPDF_Null.o libqpdf/build/.libs/QPDF_Operator.o libqpdf/build/.libs/QPDF_Real.o libqpdf/build/.libs/QPDF_Reserved.o libqpdf/build/.libs/QPDF_Stream.o libqpdf/build/.libs/QPDF_String.o libqpdf/build/.libs/QPDF_encryption.o libqpdf/build/.libs/QPDF_linearization.o libqpdf/build/.libs/QPDF_optimization.o libqpdf/build/.libs/QPDF_pages.o libqpdf/build/.libs/QTC.o libqpdf/build/.libs/QUtil.o libqpdf/build/.libs/RC4.o libqpdf/build/.libs/SecureRandomDataProvider.o libqpdf/build/.libs/qpdf-c.o libqpdf/build/.libs/rijndael.o libqpdf/build/.libs/sha2.o libqpdf/build/.libs/sha2big.o   -lpcre -lz -L/usr/bin/../lib/gcc/armv7a-cros-linux-gnueabi/4.9.x -L/usr/bin/../lib/gcc/armv7a-cros-linux-gnueabi/4.9.x/../../../../armv7a-cros-linux-gnueabi/lib/../lib -L/build/kevin/lib/../lib -L/build/kevin/usr/lib/../lib -L/usr/bin/../lib/gcc/armv7a-cros-linux-gnueabi/4.9.x/../../../../armv7a-cros-linux-gnueabi/lib -L/build/kevin/lib -L/build/kevin/usr/lib -lc++ -lm -lc -lgcc_eh /usr/bin/../lib/gcc/armv7a-cros-linux-gnueabi/4.9.x/crtendS.o /build/kevin/usr/lib/../lib/crtn.o  -O2 -O2 -O2 -march=armv8-a+crc -mtune=cortex-a57.cortex-a53 -mfpu=crypto-neon-fp-armv8 -mfloat-abi=hard -Wl,--version-script=libqpdf.map -Wl,-O1 -Wl,-O2 -Wl,--as-needed   -Wl,-soname -Wl,libqpdf.so.13 -o libqpdf/build/.libs/libqpdf.so.13.1.2

libstdc++.so imports libgcc_s.so so the __aeabi_uldivmod symbols were imported by loader. 
However, libc++.so does not depend on libgcc_s.so any symbols that were missing stay missing.

I'll send a CL to switch qpdf to use libgcc_s instead of compiler-rt which should hopefully fix the problem.

Thanks a lot for the help.

Root cause is the libtool limitation in handling compiler-rt libraries (https://bugs.chromium.org/p/chromium/issues/detail?id=749263 ).
I had patched ChromeOS's libtool to handle them but qpdf has a local libtool.m4 and therefore faced the same issue.
Project Member

Comment 19 by bugdroid1@chromium.org, Jan 20 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/portage-stable/+/b7e0dfae8a762736804e5b74042d93126216993c

commit b7e0dfae8a762736804e5b74042d93126216993c
Author: Manoj Gupta <manojgupta@google.com>
Date: Sat Jan 20 17:03:43 2018

qpdf: Call eautoreconf in src_configure.

qpdf source contains a pregenerated libtool.m4 file. This file however
cannot work with compiler-rt since libtool's upstream version doesn't handle
linking libraries that are specified without -lprefix.
ChromeOS libtool has a patch to handle clang's compiler-rt libraries.
So call eautoreconf in src_configure to make qpdf build find
compiler-rt libraries for linking.

This fixes the missing symbol error in libqdf.so:
/usr/libexec/cups/filter/pdftopdf:
symbol lookup error: /usr/lib/libqpdf.so.13: undefined symbol: __aeabi_uldivmod

Upstream libtool bug: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27866

BUG= chromium:802091 
TEST=test_that platform_AddPrinter passed on kevin.

Change-Id: I5eefd666d4dc5aca30316115b49250633c413626
Reviewed-on: https://chromium-review.googlesource.com/875001
Trybot-Ready: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Luis Lozano <llozano@chromium.org>
Commit-Queue: Manoj Gupta <manojgupta@chromium.org>
Tested-by: Manoj Gupta <manojgupta@chromium.org>

[rename] https://crrev.com/b7e0dfae8a762736804e5b74042d93126216993c/app-text/qpdf/qpdf-5.1.2-r2.ebuild

Status: Verified (was: Untriaged)

Sign in to add a comment