unable to install curl on RISC-V Linux

175 views
Skip to first unread message

Billa Surendra

unread,
Jan 20, 2022, 11:32:56 PM1/20/22
to RISC-V SW Dev
Hi Everyone,

I am trying to install the curl-7.81.0 package on my RISC-V Linux distribution, but I am getting the below error. please someone can help me to resolve this. for most of the packages when I am trying to install, I am getting the following error.


Error:


  CC       tool_writeout_json.o
  CC       tool_xattr.o
  CC       tool_hugehelp.o
  CC       ../lib/strtoofft.o
  CC       ../lib/nonblock.o
  CC       ../lib/warnless.o
  CC       ../lib/curl_ctype.o
  CC       ../lib/curl_multibyte.o
  CC       ../lib/version_win32.o
  CC       ../lib/dynbuf.o
  CCLD     curl
/usr/lib/gcc/riscv64-unknown-linux-gnu/7.3.1/../../../../riscv64-unknown-linux-gnu/bin/ld: warning: libdl.so.2, needed by ../lib/.libs/libcurl.so, not found (try using -rpath or -rpath-link)
/usr/local/lib/libcrypto.so: undefined reference to `dlclose@GLIBC_2.27'
/usr/local/lib/libcrypto.so: undefined reference to `dlerror@GLIBC_2.27'
/usr/local/lib/libcrypto.so: undefined reference to `dladdr@GLIBC_2.27'
/usr/local/lib/libcrypto.so: undefined reference to `dlopen@GLIBC_2.27'
/usr/local/lib/libcrypto.so: undefined reference to `dlsym@GLIBC_2.27'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:985: curl] Error 1
make[2]: Leaving directory '/home/package_building/curl-7.81.0/src'
make[1]: *** [Makefile:1472: all-recursive] Error 1
make[1]: Leaving directory '/home/package_building/curl-7.81.0/src'
make: *** [Makefile:1263: all-recursive] Error 1
/home/package_building/curl-7.81.0 # cd ../


Thanks and Regards
Billa

Tommy Murphy

unread,
Jan 21, 2022, 4:08:38 AM1/21/22
to Billa Surendra, RISC-V SW Dev
Isn't it basically the same issue that you had here (towards the end of that thread)?

Billa Surendra

unread,
Jan 21, 2022, 4:11:17 AM1/21/22
to Tommy Murphy, RISC-V SW Dev
yes

Tommy Murphy

unread,
Jan 21, 2022, 4:25:06 AM1/21/22
to Billa Surendra, RISC-V SW Dev
So did you follow up on Jim Wilson's comments in that thread?

Billa Surendra

unread,
Jan 21, 2022, 4:27:32 AM1/21/22
to Tommy Murphy, RISC-V SW Dev
Yes, I did.

Billa Surendra

unread,
Jan 25, 2022, 2:02:48 AM1/25/22
to Tommy Murphy, RISC-V SW Dev
Now I am getting different errors and my configuration command is below.

/home/package_building/curl-7.81.0 # ./configure --prefix=/usr --disable-static
--with-openssl=/usr/local/openssl --enable-threaded-resolver  --with-ca-path=/et
c/ssl/certs

Error:
 checking run-time libs availability... failed
configure: error: one or more libs available at link-time are not available run-time. Libs used at link-time: -lnghttp2 -lpsl -lssl -lcrypto -lzstd  -lz  -ldl

Tommy Murphy

unread,
Jan 25, 2022, 4:35:09 AM1/25/22
to Billa Surendra, RISC-V SW Dev
So some of the libraries required to configure and build curl are missing and need to be built and installed. You should refer to the curl project for configure/build time requirements and instructions.

Timo Witte

unread,
Feb 7, 2022, 8:48:00 PM2/7/22
to RISC-V SW Dev, billa.i...@gmail.com, RISC-V SW Dev, tommy_...@hotmail.com
Basically configure is telling you that libraries you specified are only availiable during build time but won´t be loadable during runtime..
either add the folders of these libraries to LD_LIBRARY path or remove "--disable-static".

See it as a chance to learn a littlebit more about how compilers and linkers work and what the difference between static and dynamic linking  is.
If you understand the principles behind it, you will be able to help yourself down the road if similar problems / errors arise, as you already know what you are dealing with.

You know, when you build software, functions out of libraries can either be linked into the resulting binary from *.lib files or *.a files, we call this "static" linking, as it basically copies the library functions into the binary you build. (the linker does this).

On the other hand you have the concept of dynamic linking / shared objects. In that case the linker just add´s a hint into your binary on which shared objects to load during runtime. In linux shared objects have an *.so extension. (in Windows they are typically called *.dll).
The benefit of shared objects: Your binary is smaller and as long as the function calls / exports in the *.so are the same, you can even update the *.so / library without the need to recompile your binary which refers to that *.so.

You can use the tool "ldd" to look which shared objects are loaded by binaries already on your system.. For example do a "ldd /bin/vi" :)

Reply all
Reply to author
Forward
0 new messages