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

CMake does not pick up build flags from curl-config #8482

Closed
mckaygerhard opened this issue Apr 22, 2019 · 3 comments
Closed

CMake does not pick up build flags from curl-config #8482

mckaygerhard opened this issue Apr 22, 2019 · 3 comments
Labels
@ Build CMake, build scripts, official builds, compiler and linker errors Possible close

Comments

@mckaygerhard
Copy link

Issue type
  • Build issue
Minetest version
5.0.0
OS / Hardware

Operating system: Linux
CPU: i7

Summary

got undefined reference to RTMP_Free when just finish compiling and when get linking got that problem

Steps to reproduce

configure cmake and just make

@mckaygerhard
Copy link
Author

after some investigations seems the libcurl.a must be linking using target_link_libraries from cmake.. but i dont know how!

please can provide me directions to solve it?

@mckaygerhard
Copy link
Author

after some investigations got the problem: its due minetest cmake does not property use the curl's curl-config utility and does not property linking.. the linking relly on other program.. this makes causing problems in chrooted and minimalistig environments for static builds

CMakeLists.txt
@@ -770,6 +770,8 @@ else()
 	if(MINGW)
 		set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -mwindows")
 	endif()
+
+	SET( CMAKE_EXE_LINKER_FLAGS  "${CMAKE_EXE_LINKER_FLAGS} -lidn -lrtmp -lcom_err -llber -lz -lrt" )
 endif()

i do not jhave exact link flags but i suspect with -lrtmp are enought. but real problem its the not right usage of the curl config utility that provides right linker

and please stop to say "update to lasted" i not using windo!

@paramat paramat added the @ Build CMake, build scripts, official builds, compiler and linker errors label Apr 22, 2019
@sfan5 sfan5 changed the title undefined reference to `RTMP_Free' CMake does not pick up build flags from curl-config Apr 22, 2019
@rubenwardy
Copy link
Member

Needs reproducing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@ Build CMake, build scripts, official builds, compiler and linker errors Possible close
Projects
None yet
Development

No branches or pull requests

3 participants