Thanks. I can confirm current mob (6c94df6) does work also with custom prefix,
as well as building in a custom dir (mkdir build && cd build && ../configure 
...).

However, looking at that commit, I thought it would break with a custom 
--libdir,
like ./configure --libdir=$(pwd)/dist/mylibs but I tried it and it still worked.

Turns out it creates both ./dist/lib and ./dist/mylibs, and libtcc.dylib is at 
both
of them as well as tcc/ and its content (duplicated at both dirs), though 
libtcc.a
is only at ./dist/lib/ .

Is that expected? I never tried using --libdir before, but commit 6c94df6 makes 
it look
a bit hardcoded, so I tried it now. Wouldn't it be better to specify the 
absolute
install [libdir] ?

Avi


     On Thursday, July 9, 2020, 08:40:42 PM GMT+3, Christian Jullien 
<[email protected]> wrote:  
 
 #yiv9999960526 #yiv9999960526 -- _filtered {} _filtered {} _filtered {} 
_filtered {} _filtered {}#yiv9999960526 #yiv9999960526 
p.yiv9999960526MsoNormal, #yiv9999960526 li.yiv9999960526MsoNormal, 
#yiv9999960526 div.yiv9999960526MsoNormal 
{margin:0in;margin-bottom:.0001pt;font-size:12.0pt;font-family:New;}#yiv9999960526
 a:link, #yiv9999960526 span.yiv9999960526MsoHyperlink 
{color:blue;text-decoration:underline;}#yiv9999960526 a:visited, #yiv9999960526 
span.yiv9999960526MsoHyperlinkFollowed 
{color:purple;text-decoration:underline;}#yiv9999960526 
p.yiv9999960526msonormal, #yiv9999960526 li.yiv9999960526msonormal, 
#yiv9999960526 div.yiv9999960526msonormal 
{margin-right:0in;margin-left:0in;font-size:12.0pt;font-family:New;}#yiv9999960526
 p.yiv9999960526msonormal1, #yiv9999960526 li.yiv9999960526msonormal1, 
#yiv9999960526 div.yiv9999960526msonormal1 
{margin:0in;margin-bottom:.0001pt;font-size:12.0pt;}#yiv9999960526 
span.yiv9999960526msohyperlink {}#yiv9999960526 
span.yiv9999960526msohyperlinkfollowed {}#yiv9999960526 
span.yiv9999960526emailstyle17 {}#yiv9999960526 span.yiv9999960526msohyperlink1 
{color:blue;text-decoration:underline;}#yiv9999960526 
span.yiv9999960526msohyperlinkfollowed1 
{color:purple;text-decoration:underline;}#yiv9999960526 
span.yiv9999960526emailstyle171 {color:#1F497D;}#yiv9999960526 
span.yiv9999960526EmailStyle25 {color:#1F497D;}#yiv9999960526 
span.yiv9999960526EmailStyle26 {color:#1F497D;}#yiv9999960526 
.yiv9999960526MsoChpDefault {font-size:10.0pt;} _filtered {}#yiv9999960526 
div.yiv9999960526WordSection1 {}#yiv9999960526 
I’ve found another (and better) way to achieve this:

-Wl,-rpath,"@executable_path/$(TOP)" -Wl,-rpath,"@executable_path/$(TOP)/../lib"

  

It is commited, can you please test this one.

  

  

From: Tinycc-devel [mailto:[email protected]] On 
Behalf Of Christian Jullien
Sent: Thursday, July 09, 2020 19:07
To: [email protected]; [email protected]
Cc: 'avih'
Subject: Re: [Tinycc-devel] macos: DYLD_LIBRARY_PATH no longer works after 
cleanup

  

Thanks avih, another step is missing (it works well with default install 
location)

Can you please test this:

$ install_name_tool -add_rpath "@executable_path/../lib/" tcc

$ make install

$ ./dist/bin/tcc -vv

tcc version 0.9.27 (x86_64 Darwin)

install: /Users/jullien/tinycc/dist/lib/tcc

…

  

It work for me. If it also works for you I’ll add this step to macos build

  

From: Tinycc-devel [mailto:[email protected]] On 
Behalf Of avih via Tinycc-devel
Sent: Thursday, July 09, 2020 18:23
To: [email protected]; [email protected]
Cc: avih
Subject: Re: [Tinycc-devel] macos: DYLD_LIBRARY_PATH no longer works after 
cleanup

  


Seems that moving ./dist/lib/libtcc.dylib to ./dist/bin/ makes it work,
compile programs successfully, and -run works as well.

So it seems that install target doesn't take everything into account.

On Thursday, July 9, 2020, 07:17:38 PM GMT+3, avih <[email protected]> wrote: 

  

  


Oh, I missed the commits from today.

Indeed, with latest mob (6bd0ced) this now succeeds:
./configure --disable-static && make && make test

However, when building and installing like this:
./configure --disable-static --prefix=$(pwd)/dist && make && make test && make 
install

Then it succeeds, but the tcc binary seems missing the dylib:
$ ./dist/bin/tcc
dyld: Library not loaded: @rpath/libtcc.dylib
Referenced from: /Users/avih/dev/tcc/tcc.upstream/./dist/bin/tcc
Reason: image not found
Abort trap: 6

When not using --disable-static, then tcc runs fine, compiles and even -run 
works.

On Thursday, July 9, 2020, 07:07:12 PM GMT+3, Christian Jullien 
<[email protected]> wrote: 

  

  

?? can you please try with mob and give me the complete log?

 

The fix is “macos: tcc searches for libtcc.dyln in the same directory as its 
executable”

 

C.

 

From: avih [mailto:[email protected]] 
Sent: Thursday, July 09, 2020 17:52
To: [email protected]; [email protected]
Subject: Re: [Tinycc-devel] macos: DYLD_LIBRARY_PATH no longer works after 
cleanup

 

What's the fix? I tried looking at the earlier messages, but didn't
see a diff/patch.

For me on osx 10.13 (real MBA) I also have the same issue when
using --disable-static, but it seems fine without it, including -run.

On Thursday, July 9, 2020, 06:38:10 PM GMT+3, Michael Matz 
<[email protected]> wrote: 

 

 

Hello Christian,

(I missed the question earlier, apologies)

On Thu, 9 Jul 2020, Christian Jullien wrote:

> If you have a moment, can you please test if my macos fix for dyld also 
> works on your configuration?

Yes, it works fine here on my emulated macOS.




Ciao,
Michael.

_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel
  
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to