Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues building for an embedded Intel CPU #451

Closed
enurseitov opened this issue Feb 23, 2023 · 2 comments
Closed

Issues building for an embedded Intel CPU #451

enurseitov opened this issue Feb 23, 2023 · 2 comments

Comments

@enurseitov
Copy link

Hi, I'm trying to build c-blosc2 on an embedded target with an Intel Atom x7-E3950.

System information:

  • OS: Ubuntu 20.04.4 LTS x86_64
  • Kernel: 5.15.0-52-generic
  • gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
  • Version: tags/v2.7.1
`lscpu` output
Architecture:                    x86_64
CPU op-mode(s):                  32-bit, 64-bit
Byte Order:                      Little Endian
Address sizes:                   39 bits physical, 48 bits virtual
CPU(s):                          4
On-line CPU(s) list:             0-3
Thread(s) per core:              1
Core(s) per socket:              4
Socket(s):                       1
NUMA node(s):                    1
Vendor ID:                       GenuineIntel
CPU family:                      6
Model:                           92
Model name:                      Intel(R) Atom(TM) Processor E3950 @ 1.60GHz
Stepping:                        10
CPU MHz:                         800.000
CPU max MHz:                     2000,0000
CPU min MHz:                     800,0000
BogoMIPS:                        3187.20
Virtualization:                  VT-x
L1d cache:                       96 KiB
L1i cache:                       128 KiB
L2 cache:                        2 MiB
NUMA node0 CPU(s):               0-3
Vulnerability Itlb multihit:     Not affected
Vulnerability L1tf:              Not affected
Vulnerability Mds:               Not affected
Vulnerability Meltdown:          Not affected
Vulnerability Mmio stale data:   Not affected
Vulnerability Retbleed:          Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:        Mitigation; Retpolines, IBPB conditional, IBRS_FW, STIBP disabled, RSB filling, PBRSB-
                                 eIBRS Not affected
Vulnerability Srbds:             Not affected
Vulnerability Tsx async abort:   Not affected
Flags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts ac
                                 pi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_p
                                 erfmon pebs bts rep_good nopl xtopology tsc_reliable nonstop_tsc cpuid aperfmperf tsc_
                                 known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg cx16 xtpr pdcm s
                                 se4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave rdrand lahf_lm 3dnowpref
                                 etch cpuid_fault cat_l2 ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept
                                 _ad fsgsbase tsc_adjust smep erms mpx rdt_a rdseed smap clflushopt intel_pt sha_ni xsa
                                 veopt xsavec xgetbv1 xsaves dtherm ida arat pln pts md_clear arch_capabilities

I can build with the default cmake configuration, however 48% of tests fail with Exception: Illegal: ctest.log

Assuming that this may be related to a reduced set of instructions supported by this CPU, i tried enabling DEACTIVATE_AVX2 and WITH_NATIVE_INSTRUCTIONS. However, this time build fails with the following errors: cmake.log

Would really appreciate any assistance with this issue.

@dmikushin
Copy link
Contributor

Hi @enurseitov , you build fails in zlib sources, which are externally maintained wrt Blosc. External code may follow its own macro conditions, not covered by e.g. DEACTVATE_AVX2. So you have the following options:

  • Look into the code of zlib-ng and find a proper way to disable AVX
  • Use classic zlib
  • Link against zlib, which comes with OS distro for your platform and works well (I think this is the best option)

@FrancescAlted
Copy link
Member

This should have been fixed in #622

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants