Re: CMake

Guilherme Brondani Torri <[email protected]>
Newsgroups gmane.comp.gnu.gnucap.devel
Message-ID <CADsY=ygZewByTrZL5fe4FsjCC5cOetVUxVG_cQHpfB0f8WoZpg@mail.gmail.com>
Hello.

It was nice meeting Al and Felix at FOSDEM 2017.
Allow me to restart this thread about 2 years after it first started.

I just managed to rebuild gnucap on my Mac.
Please have a look in the branch update_cmake_osx_build [1].
I merged the latest autotools branch on my modified version of cmake
branch.
So, it now contains gnucap and CMake fixes.
It is running well. A few tests are failing. I will try to find out more
about them later.

I also had to create a /usr/local/bin/gnucap.rc containing:
"load /usr/local/lib/gnucap/gnucap-default-plugins.dylib"

For some reason it would not find the plugins:
===
main version: unstable 2016.11.17
core-lib version: unstable 2016.11.17
load gnucap-default-plugins.dylib
     ^ ? dlopen(gnucap-default-plugins.dylib, 6): image not found
libc++abi.dylib: terminating with uncaught exception of type Exception_CS
Abort trap: 6
===

So, CMake is working for me.

So far I haven't tried the Make1, Make2, Make3 makefiles.

I also tried fixing the autotools build, see [2] (which is now based on
[1]).
It builds fine but I am unable to run it. See bellow:

From the build directory:
===
[autotools-osx]~/git/gnucap $ ./main/gnucap
./main/gnucap.real: line 117:
/Users/guitorri/git/gnucap/main/.libs/gnucap.real: cannot execute binary
file
./main/gnucap.real: line 117:
/Users/guitorri/git/gnucap/main/.libs/gnucap.real: Undefined error: 0
===

After make install:
===
[autotools-osx]~/git/gnucap $ gnucap
-bash: /usr/local/bin/gnucap: cannot execute binary file
[autotools-osx]~/git/gnucap $ which gnucap
/usr/local/bin/gnucap
[autotools-osx]~/git/gnucap $ otool -L /usr/local/bin/gnucap
/usr/local/bin/gnucap:
.libs/gnucap.real (compatibility version 0.0.0, current version 0.0.0)
/usr/local/lib/libgnucap.0.dylib (compatibility version 1.0.0, current
version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version
1238.0.0)
/usr/lib/libedit.3.dylib (compatibility version 2.0.0, current version
3.0.0)
/usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current version
5.4.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version
307.4.0)
===

How to proceed to get the functioning patches upstream?
Shall I split the patches targeting unstable, cmake and autotools branches?

Best regards,
Guilherme

[1] https://github.com/guitorri/gnucap/tree/update_cmake_osx_build
[2] https://github.com/guitorri/gnucap/tree/autotools-osx
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.