with the current package: ❯ julia ERROR: Unable to find compatible target in system image. The port is broken as well, for example, does not install cert.pem or libz.so.1. ❯ uname -a FreeBSD och.pentode.fi 13.1-RELEASE FreeBSD 13.1-RELEASE releng/13.1-n250148-fc952ac2212 GENERIC amd64
(In reply to Alexey Vyskubov from comment #0) Sorry but i can't reproduce, julia is working fine for me. I have seen bug's like this related to cpuid ether not detecting the uarch or julia not supporting a particular uarch, can you tell me what uarch you are using. Also the FreeBSD port of julia is using the libz in FreeBSD, but i will look into cert.pem
(In reply to Eric Reardon from comment #1) You cannot reproduce because julia is compiled with support for your cpu instead of generic. Julia is the only thing that does not work. What is uarch and how do I determine it? ❯ doas cpuid eax in eax ebx ecx edx 00000000 0000000b 756e6547 6c65746e 49656e69 00000001 00030678 02100800 41d8e3bf bfebfbff 00000002 61b3a001 0000ffc2 00000000 00000000 00000003 00000000 00000000 00000000 00000000 00000004 1c000121 0140003f 0000003f 00000001 00000005 00000040 00000040 00000003 33000020 00000006 00000007 00000002 00000009 00000000 00000007 00000000 00002282 00000000 00000000 00000008 00000000 00000000 00000000 00000000 00000009 00000000 00000000 00000000 00000000 0000000a 07280203 00000000 00000000 00004503 0000000b 00000001 00000001 00000100 00000002 80000000 80000008 00000000 00000000 00000000 80000001 00000000 00000000 00000101 28100800 80000002 20202020 6e492020 286c6574 43202952 80000003 72656c65 52286e6f 50432029 4e202055 80000004 30343832 20402020 36312e32 007a4847 80000005 00000000 00000000 00000000 00000000 80000006 00000000 00000000 04008040 00000000 80000007 00000000 00000000 00000000 00000100 80000008 00003024 00000000 00000000 00000000 Vendor ID: "GenuineIntel"; CPUID level 11 Intel-specific functions: Version 00030678: Type 0 - Original OEM Family 6 - Pentium Pro Model 55 - Stepping 8 Reserved 0 Feature flags set 2 (CPUID.01H:ECX): 41d8e3bf: SSE3 SSE3 extensions PCLMULDQ PCLMULDQ instruction DTES64 64-bit debug store MONITOR MONITOR/MWAIT instructions DS-CPL CPL Qualified Debug Store VMX Virtual Machine Extensions EST Enhanced Intel SpeedStep Technology TM2 Thermal Monitor 2 SSSE3 Supplemental Streaming SIMD Extension 3 CX16 CMPXCHG16B xTPR Send Task Priority messages PDCM Perfmon and debug capability SSE4.1 Streaming SIMD Extension 4.1 SSE4.2 Streaming SIMD Extension 4.2 MOVBE MOVBE instruction POPCNT POPCNT instruction TSC-Deadline RDRAND RDRAND Instruction Extended feature flags set 1 (CPUID.80000001H:EDX): 28100800 SYSCALL SYSCALL/SYSRET instructions XD-bit Execution Disable bit RDTSCP RDTSCP and IA32_TSC_AUX are available EM64T Intel Extended Memory 64 Technology Extended feature flags set 2 (CPUID.80000001H:ECX): 00000101 LAHF LAHF/SAHF available in IA-32e mode 8 - unknown feature Old-styled TLB and cache info: a0: unknown TLB/cache descriptor b3: Data TLB: 4-KB Pages, 4-way set associative, 128 entries 61: unknown TLB/cache descriptor c2: unknown TLB/cache descriptor ff: CPUID leaf 2 does not report full information, query leaf 4 Processor serial: 0003-0678-0000-0000-0000-0000 Deterministic Cache Parameters: index=0: eax=1c000121 ebx=0140003f ecx=0000003f edx=00000001 > Data cache, level 1, self initializing > 64 sets, 6 ways, 1 partitions, line size 64 > full size 24576 bytes > NB this package has up to 8 threads index=1: eax=1c000122 ebx=01c0003f ecx=0000003f edx=00000001 > Instruction cache, level 1, self initializing > 64 sets, 8 ways, 1 partitions, line size 64 > full size 32768 bytes index=2: eax=1c00c143 ebx=03c0003f ecx=000003ff edx=00000001 > Unified cache, level 2, self initializing > 1024 sets, 16 ways, 1 partitions, line size 64 > full size 1048576 bytes > shared between up to 4 threads Structured feature flags CPUID.07H.00H:EBX: 00002282: IA32_TSC_ADJUST MSR SMEP Enhanced REP MOVSB/STOSB Deprecates FPU CS and FPU DS Regarding libz: here is the behavior with the latest port: (I have removed ~/.julia and added FFMPEG) julia> import FFMPEG [ Info: Precompiling FFMPEG [c87230d0-a227-11e9-1b43-d7ebe4e7570a] ERROR: LoadError: InitError: could not load library "/home/alexey/.julia/artifacts/68256e02e4a4b00bc95486fd61b4bc5c7348760c/lib/libfreetype.so" Shared object "libz.so.1" not found, required by "libfreetype.so" Stacktrace: [blah] What do I miss?
(In reply to Alexey Vyskubov from comment #2) I used the package from FreeBSD pkg to test the problem not my own port and if removing ~/.julia fixed the first error then the problem was probably some sort of corruption in ~/.julia instead of uarch detection. As to zlib and other bundled lib's some of julia's package's are linked to the bundled lib's but FreeBSD's policy is to avoid bundled lib's https://docs.freebsd.org/en/books/porters-handbook/special/#bundled-libs so your options going forward are either to use BinaryBuilder.jl https://github.com/JuliaPackaging/BinaryBuilder.jl to replace those dependence's or use the stock version of julia https://julialang.org/downloads/ or wait for me add support for julia's app's and module's to FreeBSD port's.
(In reply to Eric Reardon from comment #3) Removing ~/.julia fixed nothing. I did it to illustrate zlib problem in port. The package does not work at all.
I am happy to inform you that the binary FreeBSD build from the Julia website: - runs, unlike the current FreeBSD package; - does not fail at precompiling stuff, unlike the current FreeBSD port. Thank you for the pointer!
Created attachment 235219 [details] Patch for lang/julia I was able to reproduce the error on older computer i had, this patch fixes the error for me and adds the missing cert.pem. Patch passes portlint and poudriere, please merge to quarterly branch.
Instead of using native perhaps you use CPUTYPE variable as this is globally used in FreeBSD and for ports. https://cgit.freebsd.org/src/tree/share/examples/etc/make.conf#n25
(In reply to Daniel Engberg from comment #8) Sorry but CPUTYPE does not seem to work, i ran it as ${CPUTYPE} and CPUTYPE but the build failed each time with ERROR: Invalid CPU name "CPUTYPE".
Created attachment 235694 [details] Updated patch for lang/julia Updating patch after https://cgit.freebsd.org/ports/commit/?id=f98ae56653d5255e3519da4e97d6edbaa7e6df91
Downloading Julia from https://julialang.org/downloads works for me as well: https://julialang-s3.julialang.org/bin/freebsd/x64/1.8/julia-1.8.0-freebsd-x86_64.tar.gz
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=6f2b881f6fcf3d35f33368511f85dc07662c6b2c commit 6f2b881f6fcf3d35f33368511f85dc07662c6b2c Author: Eric Reardon <rizor.reardon@yahoo.com> AuthorDate: 2022-09-11 18:15:33 +0000 Commit: Daniel Engberg <diizzy@FreeBSD.org> CommitDate: 2022-09-11 18:48:31 +0000 lang/julia: Fix runtime issue * Disable automatic optimization as this causes runtime issues if CPU instructions are not available. * Install certificate PR: 265109 Reported by: Alexey Vyskubov <alexey@ocaml.nl> lang/julia/Makefile | 11 ++++++++--- lang/julia/pkg-plist | 1 + 2 files changed, 9 insertions(+), 3 deletions(-)
Committed with some minor changes, sorry for the wait