| Summary: | sdl-config gets runtime libdir undefined for runtime linker. | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Ben Taylor <sol11x86> |
| Component: | build | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | major | ||
| Priority: | P2 | CC: | vapier |
| Version: | HG 1.2 | ||
| Hardware: | x86 | ||
| OS: | Solaris | ||
Reopening bug until patch is evaluated. --ryan. you cant assume ${prefix}/lib is correct ... there's a reason we have ${libdir} in the first place
you either want to change sdl-config.in like so:
exec_prefix_set=no
+libdir=@libdir@
or you want to change configure.in like so:
- SDL_RLD_FLAGS="-Wl,-rpath,\${libdir}"
+ SDL_RLD_FLAGS="-Wl,-rpath,${libdir}"
(In reply to comment #2) > you cant assume ${prefix}/lib is correct ... there's a reason we have ${libdir} > in the first place > > you either want to change sdl-config.in like so: > exec_prefix_set=no > +libdir=@libdir@ > > or you want to change configure.in like so: > - SDL_RLD_FLAGS="-Wl,-rpath,\${libdir}" > + SDL_RLD_FLAGS="-Wl,-rpath,${libdir}" > fixing sdl-config.in makes more sense to me, but I also wonder why there's a -L${prefix}/lib and -R${libdir}. Shouldn't it either be -L${libdir} -R${libdir} or -L${prefix}/lib -R${prefix}/lib to maintain a little bit of consistency. I believe svn revision #3003 (1.2 branch) and #3004 (1.3 branch)--which were applied for a similar complaint on the mailing list--fixes this issue, so I'm resolving this bug. If that turns out not to be the case, please reopen it. Thanks, --ryan. |
Solaris 10/U3 X86, building libSDL-1.2 SVN. sdl-config is created with runtime linker directory that has no definition. IE, starting line 46 of the generated sdl-config: --libs) echo -L${exec_prefix}/lib -R${libdir} -lSDL -lpthread -lposix4 ;; --static-libs) # --libs|--static-libs) echo -L${exec_prefix}/lib -R${libdir} -lSDL -lpthread -lposix4 libdir is not defined by sdl-config, and therefore generates an error for other programs which run sdl-config --libs or sdl-config --static-libs. This patch fixes the usage of libdir to match the ${exec_prefix}/lib. Do I also need to submit a patch for configure since configure.in generates configure? --- configure.in.ORIG 2007-03-04 11:31:09.937988000 -0500 +++ configure.in 2007-03-04 11:31:13.597902000 -0500 @@ -2621,10 +2621,10 @@ if test "x$enable_rpath" = "xyes"; then if test $ARCH = bsdi -o $ARCH = freebsd -o $ARCH = irix -o $ARCH = linux -o $ARCH = netbsd; then - SDL_RLD_FLAGS="-Wl,-rpath,\${libdir}" + SDL_RLD_FLAGS="-Wl,-rpath,\${exec_prefix}/lib" fi if test $ARCH = solaris; then - SDL_RLD_FLAGS="-R\${libdir}" + SDL_RLD_FLAGS="-R\${exec_prefix}/lib" fi else SDL_RLD_FLAGS="" @@ -2639,7 +2639,7 @@ SDL_LIBS="$SDL_LIBS -Wl,-framework,Carbon" fi # Evil hack to allow static linking on Mac OS X - SDL_STATIC_LIBS="\${libdir}/libSDLmain.a \${libdir}/libSDL.a $EXTRA_LDFLAGS" + SDL_STATIC_LIBS="\${exec_prefix}/lib/libSDLmain.a \${exec_prefix}/lib/libSDL.a $EXTRA_LDFLAGS" ;; *) SDL_STATIC_LIBS="$SDL_LIBS"