Re: [fossil-users] /usr/bin/ld: cannot find -ldl

2018-07-13 Thread Jungle Boogie
On Fri 13 Jul 2018  5:08 AM, Artur Shepilko wrote:
> > openBSD -current x64
> > $ cc -v
> > OpenBSD clang version 6.0.0 (tags/RELEASE_600/final) (based on LLVM 6.0.0)
> > Target: amd64-unknown-openbsd6.3
> > Thread model: posix
> > InstalledDir: /usr/bin
> >
> 
> Ok, I think I found the problem. This info was very helpful.
> 
> Indeed, the *BSD platforms have all the dl functionality in the
> standard C library, so no libdl present.
> This should make the test `[check-function-in-lib dlopen dl]` pass
> without the need for -ldl.
> 
> Corrected it and pushed an update
> [http://fossil-scm.org/index.html/info/7cdb522b42aad6a1]
> Please try if this solves it for you.
> 
> Thank you for catching the bug!


Thank YOU for fixing and pushing it to trunk. I've been able to successfully
build fossil now.

Thanks!
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] /usr/bin/ld: cannot find -ldl

2018-07-13 Thread Artur Shepilko
> openBSD -current x64
> $ cc -v
> OpenBSD clang version 6.0.0 (tags/RELEASE_600/final) (based on LLVM 6.0.0)
> Target: amd64-unknown-openbsd6.3
> Thread model: posix
> InstalledDir: /usr/bin
>

Ok, I think I found the problem. This info was very helpful.

Indeed, the *BSD platforms have all the dl functionality in the
standard C library, so no libdl present.
This should make the test `[check-function-in-lib dlopen dl]` pass
without the need for -ldl.

Corrected it and pushed an update
[http://fossil-scm.org/index.html/info/7cdb522b42aad6a1]
Please try if this solves it for you.

Thank you for catching the bug!
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] /usr/bin/ld: cannot find -ldl

2018-07-12 Thread Artur Shepilko
I made the recent change that moves the -ldl to the end of the link
library list (http://fossil-scm.org/index.html/info/efbc319c32a38fab).
However its effect should be rather trivial, just moving the -ldl to
the end of the library list. Such check was there before, just the
-ldl would be inserted afer -lm
This altogether would matter for __static__ linking,  in your case I
understand you configured for dynamic linking.

So if your build was succeeding prior to this change, I'd be puzzled too.

Could you share here the contents of config.log file from your fossil
build directory?

If possible, please make a fresh configure & build:
--
cd bld
make distclean
../configure  
ls config.log
ls Makefile
make
-

I assume it shoud fail again due to -ldl. So the config.log could shed
some light on the results of testing for dl library.
We'll see what the reason for the config check to incorrectly finding
libdl on your platform.

In case you just want to have it built, you may manually edit the
generated Makefile and remove -ldl from the LIB line, supposedly it's
not needed in your configuration.


On Thu, Jul 12, 2018 at 4:29 PM, Jungle Boogie  wrote:
> Hi All,
>
> Since commit 9c38803597 I can't build fossil successfully:
>
> .obld/linenoise.o  bld/shell.o  bld/th.o  bld/th_lang.o  bld/th_tcl.o
> bld/cson_amalgamation.o -lfuse -lm -lssl -lcrypto -lz -ldl
> /usr/bin/ld: cannot find -ldl
> cc: error: linker command failed with exit code 1 (use -v to see invocation)
> *** Error 1 in /home/jungle/fossil-repos/fossil (./src/main.mk:670 'fossil')
>
> Looks like there was only one minor change to the makemake.tcl file. I can
> generate main.mk file without any issues:
>  tclsh makemake.tcl
>  building main.mk
>  building ../win/Makefile.mingw
>  building ../win/Makefile.dmc
>  building ../win/Makefile.msc
>  building ../win/Makefile.PellesCGMake
>
>  Just compiling is failing.
>
>
>  Any clues?
>
>  Thanks!
> ___
> fossil-users mailing list
> fossil-users@lists.fossil-scm.org
> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] /usr/bin/ld: cannot find -ldl

2018-07-12 Thread Warren Young
On Jul 12, 2018, at 4:23 PM, Warren Young  wrote:
> 
> cc-check-function-in-lib dlopen dl
> cc-check-function-in-lib iconv iconv
> cc-check-function-in-lib inflateEnd z
> cc-check-function-in-lib gethostbyname nsl
> cc-check-function-in-lib ns_name_uncompress resolv
> cc-check-function-in-lib sqlite3_open sqlite3 $extralibs
> cc-check-function-in-lib dlopen dl 

Copy-paste bug: remove the second dlopen(2) check.  It should be checked early, 
because many other libraries use this syscall.

The networking stuff is after the core syscall checks, but before any libraries 
that do networking, etc.

The order of the libnsl and libresolv checks might need to be swapped, but I 
think I’ve got it right as shown.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] /usr/bin/ld: cannot find -ldl

2018-07-12 Thread Warren Young
On Jul 12, 2018, at 4:06 PM, Richard Hipp  wrote:
> 
> On 7/12/18, Jungle Boogie  wrote:
>> 
>> openBSD -current x64
> 
> I don't have access to such a system for debugging purposes.  Can you
> suggest a patch?

I’d suggest revisiting the decision to replace cc-check-function-in-lib with 
the custom check-function-in-lib variant.  The logic behind it seems suspect: 
you *want* it to modify LIBS because you order the calls to the function in 
leaf-to-root order.

That is, the checks should be ordered so:

cc-check-function-in-lib dlopen dl
cc-check-function-in-lib iconv iconv
cc-check-function-in-lib inflateEnd z
cc-check-function-in-lib gethostbyname nsl
cc-check-function-in-lib ns_name_uncompress resolv
cc-check-function-in-lib sqlite3_open sqlite3 $extralibs
cc-check-function-in-lib dlopen dl 

That call list is based on the current contents of auto.def, but consider it 
pseudocode, not a patch, intended just to show the pattern: the most 
depended-upon library is checked for first, because it may be needed to link 
one or more of those that follow, especially on non-Linux systems which usually 
have linkers that won’t chase dependencies for you automatically.

The stock version of cc-check-function-in-lib *prepends* each subsequent 
library for this very reason: so that the first-checked library ends up at the 
*end* of LIBS.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] /usr/bin/ld: cannot find -ldl

2018-07-12 Thread Richard Hipp
On 7/12/18, Jungle Boogie  wrote:
>
> openBSD -current x64

I don't have access to such a system for debugging purposes.  Can you
suggest a patch?

-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] /usr/bin/ld: cannot find -ldl

2018-07-12 Thread Richard Hipp
On 7/12/18, Jungle Boogie  wrote:
>
>  Any clues?

Could you tell us what platform you are trying to compile on?
-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] /usr/bin/ld: cannot find -ldl

2018-07-12 Thread Jungle Boogie
Hi All,

Since commit 9c38803597 I can't build fossil successfully:

.obld/linenoise.o  bld/shell.o  bld/th.o  bld/th_lang.o  bld/th_tcl.o
bld/cson_amalgamation.o -lfuse -lm -lssl -lcrypto -lz -ldl
/usr/bin/ld: cannot find -ldl
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error 1 in /home/jungle/fossil-repos/fossil (./src/main.mk:670 'fossil')

Looks like there was only one minor change to the makemake.tcl file. I can
generate main.mk file without any issues:
 tclsh makemake.tcl
 building main.mk
 building ../win/Makefile.mingw
 building ../win/Makefile.dmc
 building ../win/Makefile.msc
 building ../win/Makefile.PellesCGMake

 Just compiling is failing.


 Any clues?

 Thanks!
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users