PerryWerneck / pw3270

3270 Emulator for gtk
https://softwarepublico.gov.br/social/pw3270/
GNU Lesser General Public License v3.0
58 stars 12 forks source link

I still have the error: `Fails to build on macOS -- missing pw3270_build_data_path()` #63

Closed spoofy-zz closed 4 months ago

spoofy-zz commented 4 months ago

I still have the error:

/Users/bnovak/git/pw3270/.obj/pw3270/Release/./src/objects/actions/abstract.o ...
Undefined symbols for architecture x86_64:
  "_pw3270_build_data_path", referenced from:
      _startup in application.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [/Users/bnovak/git/pw3270/.bin/Release/pw3270] Error 1

Monterey on Macbook Air 2017,"macos" branch.

Originally posted by @spoofy-zz in https://github.com/PerryWerneck/pw3270/issues/58#issuecomment-1974891507

PerryWerneck commented 4 months ago

Are you using the macos branch?

spoofy-zz commented 4 months ago

Are you using the macos branch?

Yes

wrljet commented 4 months ago

Are you using the macos branch?

I see the same issue now myself.

This linker problem comes up during make, (before the bundle in the macos directory).

It works if I checkout commit d83869d that I was using before, when we last went through this.

Bill

PerryWerneck commented 4 months ago

The pw3270_build_data_path() function is in the source, but, since the github action for macos os is failing (again) and I dont have a maco the check it I cant debug this issue.

wrljet commented 4 months ago

Perry,

I found the problem. Quite simple. I want to do another full dry run to make sure before I post it here.

Bill

wrljet commented 4 months ago

Somewhere / somehow between commit https://github.com/PerryWerneck/pw3270/commit/d83869d816bdb595093f43eddbb8a595599c0f37 and current, the src/main/macos directory (and its tools.c) has disappeared.

Unfortunately I don't know how to drive git well enough to figure out where/when/how this happened.

Bill

PerryWerneck commented 4 months ago

That's odd! I just checked in the github web (https://github.com/PerryWerneck/pw3270/tree/macos/src/main/macos) and the source seens ok. I just checked and it's available on develop and macos branches. It's missing only in the master branch but this is expected since they're was not merged (yet).

Just for curiosity: Whats the output of the 'git branch' command in you machine?

wrljet commented 4 months ago

You can see from the below, it's just gone from the current HEAD or macos branch.

bill@Bills-Mac-mini junk % git clone https://github.com/PerryWerneck/pw3270.git
Cloning into 'pw3270'...
remote: Enumerating objects: 25600, done.
remote: Counting objects: 100% (2609/2609), done.
remote: Compressing objects: 100% (888/888), done.
remote: Total 25600 (delta 1734), reused 2544 (delta 1685), pack-reused 22991
Receiving objects: 100% (25600/25600), 5.26 MiB | 10.48 MiB/s, done.
Resolving deltas: 100% (18804/18804), done.

bill@Bills-Mac-mini junk % cd pw3270 
bill@Bills-Mac-mini pw3270 % git branch
* master

bill@Bills-Mac-mini pw3270 % find . -name tools.c
./src/objects/window/tools.c
./src/objects/actions/tools.c
./src/main/tools.c
./src/main/linux/tools.c
./src/main/windows/tools.c

bill@Bills-Mac-mini pw3270 % git checkout -b macos
Switched to a new branch 'macos'

bill@Bills-Mac-mini pw3270 % find . -name tools.c 
./src/objects/window/tools.c
./src/objects/actions/tools.c
./src/main/tools.c
./src/main/linux/tools.c
./src/main/windows/tools.c

bill@Bills-Mac-mini pw3270 % 
wrljet commented 4 months ago

And, yes, it is odd! :)

PerryWerneck commented 4 months ago

You are using a clone of the master branch named macos, not the real branch from github. That's why the code isn't updated.

From your message:

bill@Bills-Mac-mini pw3270 % git branch
* master

Then, later, you create a new branch...

bill@Bills-Mac-mini pw3270 % git checkout **-b** macos
Switched to a NEW BRANCH 'macos'

To switch to the macos branch from github you should use....

git checkout macos
git pull
wrljet commented 4 months ago

git checkout macos gives an error msg.

Like I mentioned before, I don't get git. And very much dislike it.

PerryWerneck commented 4 months ago

git checkout macos gives an error msg.

What error? Did you restarted with a clean folder? I think the checkout/pull/fetch will fail since you created your own macos branch.

wrljet commented 4 months ago

Just BTW, I'm only involved in this at all to help out fellow Hercules IBM mainframe friends...

OK, so...

bill@Bills-Mac tools % git clone https://github.com/PerryWerneck/pw3270.git ./pw3270
Cloning into './pw3270'...
remote: Enumerating objects: 25600, done.
remote: Counting objects: 100% (2609/2609), done.
remote: Compressing objects: 100% (888/888), done.
remote: Total 25600 (delta 1734), reused 2544 (delta 1685), pack-reused 22991
Receiving objects: 100% (25600/25600), 5.26 MiB | 10.66 MiB/s, done.
Resolving deltas: 100% (18804/18804), done.
bill@Bills-Mac tools % 
bill@Bills-Mac tools % 
bill@Bills-Mac tools % cd pw3270   
bill@Bills-Mac pw3270 % 
bill@Bills-Mac pw3270 % git checkout macos
fatal: 'macos' could be both a local file and a tracking branch.
Please use -- (and optionally --no-guess) to disambiguate
bill@Bills-Mac pw3270 % 
PerryWerneck commented 4 months ago

Try 'git checkout develop' it's the same source now.

spoofy-zz commented 4 months ago

So, it seems that problem is because it exist directory "macos" named same as the branch (macos). Maybe branch renaming leads to less confusion. Than this issue can be closed.

wrljet commented 4 months ago

What is the correct git command to checkout a branch who's name conflicts with a directory?

PerryWerneck commented 4 months ago

So, it seems that problem is because it exist directory "macos" named same as the branch (macos). Maybe branch renaming leads to less confusion. Than this issue can be closed.

For now I'll remove the macos branch; it was merged to develop.

PerryWerneck commented 4 months ago

What is the correct git command to checkout a branch who's name conflicts with a directory?

git checkout develop should work.

wrljet commented 4 months ago

Yes, I have verified develop branch does work!

One small issue, though, on Apple silicon...

The autogen.sh scripts in the lib3270 and libv3270 have some code to figure out if glibtoolize should be used instead of libtoolize.

That needs to be added to the main pw3270 project autogen.sh as well.

Bill

wrljet commented 4 months ago

Tested that change. Build process all working well, now, on macOS Apple silicon.

The Hercules emulator community really likes your 3270. Thanks!

PerryWerneck commented 4 months ago

Closing as build process is now working well.

andrebreves commented 4 months ago

What is the correct git command to checkout a branch who's name conflicts with a directory?

Depending on your version of git client, you can use the git switch command to switch branches. This command was created to address this kind of situations where a branch has the same name of a file.

wrljet commented 4 months ago

Thank you for that tip. And thank you for your other invaluable contributions.