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

Configure issue on aarch64 #649

Open
Rhialto opened this issue Apr 5, 2024 · 1 comment
Open

Configure issue on aarch64 #649

Rhialto opened this issue Apr 5, 2024 · 1 comment
Assignees

Comments

@Rhialto
Copy link
Contributor

Rhialto commented Apr 5, 2024

I received a report from a pkgsrc user who wanted to build Hercules on their aarch64 machine.

They had built and installed the 4 helper libraries (extpkgs) in /usr/pkg/lib/hercules4sdl/lib and correspondingly passed the option --enable-extpkgs=/usr/pkg/lib/hercules4sdl to configure.

Nevertheless the build did not find them.

When I examined configure.ac I found this:

 127 #--------------------------------------------------------------#
 128 #  Determine target CPU architecture  (x86, mips, sparc, etc)  #
 129 #--------------------------------------------------------------#
 130 
 131 AC_MSG_CHECKING( [target CPU architecture] )
 132 
 133 case "$target_cpu" in
 134 
 135     i*86|x86*)
 136         hc_cv_cpu_arch=x86
 137         hc_cv_pkg_lib_subdir=""
 138         ;;
 139 
 140     aarch64*)
 141         hc_cv_cpu_arch=aarch64
 142         hc_cv_pkg_lib_subdir="/aarch64"
 143         ;;
 144 

and further down

3162 if test "${hc_cv_extpkg_dir}" != ""; then
3163   crypto_pkgdir="${hc_cv_extpkg_dir}"
3164 else
3165   crypto_pkgdir="${srcdir}/${crypto_pkgname}"
3166 fi    
3167     
3168 crypto_incdir="${crypto_pkgdir}/include"
3169 crypto_libdir="${crypto_pkgdir}/lib${hc_cv_pkg_lib_subdir}"

...
3298 LDFLAGS="$LDFLAGS -L${crypto_libdir}"

So what's happening here is that if the Hercules source package contains pre-compiled libraries, they would be in "${srcdir}/${crypto_pkgname}"/"lib${hc_cv_pkg_lib_subdir}" from lines 3165 and 3169.

Currently there are only IA32/IA64 binaries in there, but that's kind of beside the point. It's for "future expansion", let's say.

Unfortunately this effectively means that the directory specified by --enable-extpkgs is not obeyed.

What would be a good way out of this?

Something like this

3162 if test "${hc_cv_extpkg_dir}" != ""; then
3163   crypto_pkgdir="${hc_cv_extpkg_dir}"
       crypto_libdir="${crypto_pkgdir}/lib"
3164 else
3165   crypto_pkgdir="${srcdir}/${crypto_pkgname}"
       crypto_libdir="${crypto_pkgdir}/lib${hc_cv_pkg_lib_subdir}"
3166 fi    
3167     
3168 crypto_incdir="${crypto_pkgdir}/include"

times 4?

@wrljet wrljet self-assigned this Apr 6, 2024
@wrljet
Copy link
Member

wrljet commented Apr 6, 2024

I'll work with you to clean this up.

Bill

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

2 participants