Skip to content

Could not build on arm64 / nvidia spark -- changed makefile with gemini 3 flash #207

@NilsRethmeier

Description

@NilsRethmeier

Working with this makefile in lib/pclsync/

Warning: just wanted this to run, used gemini 3 flash. So give it this as context to explain the fix

  1. If you ran sudo apt install libfuse2t64 from the appimage install mentioned on the webpage for ubuntu 24.04 (spark uses it), the check that you have nautilus still installed. Othwise reinstall nautilus via sudo apt-get install nautilus. Its because nautilus uses fuse3, not fuse2, so that command may have removed it.
  2. Replaced the makefile at this path ~/Downloads/console-client/pCloudCC/lib/pclsync/Makefile ,or wherever you downloaded to. See makefile below
CC=gcc
AR=ar rcu
RANLIB=ranlib
#USESSL=openssl
USESSL=mbed

#CFLAGS=-Wall -Wpointer-arith -O2 -g -mtune=core2
# CFLAGS=-Wall -Wpointer-arith -O2 -g -fno-stack-protector -fomit-frame-pointer -mtune=generic -I../sqlite -DP_ELECTRON -fPIC

# gemini 3 flags here
CFLAGS=-Wall -Wpointer-arith -O2 -g -fno-stack-protector -fomit-frame-pointer -mtune=generic -I../sqlite -DP_ELECTRON -fPIC -DP_FS -DP_CLOUD_CRYPTO -DP_SSL_MBEDTLS -I../mbedtls/include

#CFLAGS=-Wall -Wpointer-arith -O2 -g -fsanitize=address -mtune=core2
#CFLAGS=-Wall -Wpointer-arith -O2 -g -fsanitize=address -mtune=core2 -I../sqlite
#CFLAGS=-Wall -Wpointer-arith -Os -g -mtune=core2 -I../sqlite -pg
#CFLAGS=-Wall -Wpointer-arith -O2 -g -fno-stack-protector -fomit-frame-pointer -mtune=generic -I../sqlite/ -fPIC
#CFLAGS=-Wall -Wpointer-arith -O2 -g -mtune=core2 -I../sqlite -pg -m32 -D_FILE_OFFSET_BITS=64
#CFLAGS=-O2 -g -pg
#CFLAGS=-Wall -Wpointer-arith -O2 -g -mtune=core2 -I../../psync32/zlib -I../../psync32/sqlite -m32 -D_FILE_OFFSET_BITS=64

LIB_A=psynclib.a
#LIB_A=libpsynclib.a


ifeq ($(OS),Windows_NT)
    CFLAGS += -DP_OS_WINDOWS
    LIB_A=psynclib.dll
    AR=$(CC) -shared -o
    RANLIB=strip --strip-unneeded
    LDFLAGS=-s
else
    UNAME_S := $(shell uname -s)
    UNAME_V := $(shell uname -v)
    ifeq ($(UNAME_S),Linux)
        CFLAGS += -DP_OS_LINUX -D_FILE_OFFSET_BITS=64
            ifneq (,$(findstring Debian,$(UNAME_V)))
                CFLAGS += -DP_OS_DEBIAN
            endif
	LDFLAGS += -lssl -lcrypto -lfuse -lpthread -lsqlite3 -lzlib
    endif
    ifeq ($(UNAME_S),Darwin)
        CFLAGS += -DP_OS_MACOSX -I/usr/local/ssl/include/
        CFLAGS += -DP_OS_MACOSX -I/usr/local/include/osxfuse/
	LDFLAGS += -lssl -lcrypto -losxfuse -lsqlite3 -framework Cocoa -L/usr/local/ssl/lib
        #USESSL=securetransport
    endif
endif

# OBJ=pcompat.o psynclib.o plocks.o plibs.o pcallbacks.o pdiff.o pstatus.o papi.o ptimer.o pupload.o pdownload.o pfolder.o\
#      psyncer.o ptasks.o psettings.o pnetlibs.o pcache.o pscanner.o plist.o plocalscan.o plocalnotify.o pp2p.o\
#      pcrypto.o pssl.o pfileops.o ptree.o ppassword.o prunratelimit.o pmemlock.o pnotifications.o pexternalstatus.o publiclinks.o\
#      pbusinessaccount.o pcontacts.o poverlay.o poverlay_lin.o poverlay_mac.o poverlay_win.o pcompression.o pasyncnet.o ppathstatus.o\
#      pdevice_monitor.o ptools.o

# gemini 3 flash added .o here
OBJ=pcompat.o psynclib.o plocks.o plibs.o pcallbacks.o pdiff.o pstatus.o papi.o ptimer.o pupload.o pdownload.o pfolder.o\
    psyncer.o ptasks.o psettings.o pnetlibs.o pcache.o pscanner.o plist.o plocalscan.o plocalnotify.o pp2p.o\
    pcrypto.o pssl.o pfileops.o ptree.o ppassword.o prunratelimit.o pmemlock.o pnotifications.o pexternalstatus.o publiclinks.o\
    pbusinessaccount.o pcontacts.o poverlay.o poverlay_lin.o poverlay_mac.o poverlay_win.o pcompression.o pasyncnet.o ppathstatus.o\
    pdevice_monitor.o ptools.o pssl-mbedtls.o \
    pfs.o ppagecache.o pfsfolder.o pfstasks.o pfsupload.o pintervaltree.o pfsxattr.o pcloudcrypto.o pfscrypto.o pcrc32c.o pfsstatic.o

OBJFS=pfs.o ppagecache.o pfsfolder.o pfstasks.o pfsupload.o pintervaltree.o pfsxattr.o pcloudcrypto.o pfscrypto.o pcrc32c.o pfsstatic.o plocks.o

OBJNOFS=pfsfake.o

ifeq ($(USESSL),openssl)
  OBJ += pssl-openssl.o
  CFLAGS += -DP_SSL_OPENSSL
endif
ifeq ($(USESSL),securetransport)
  OBJ += pssl-securetransport.o
  CFLAGS += -DP_SSL_SECURETRANSPORT
endif
ifeq ($(USESSL),mbed)
  OBJ += pssl-mbedtls.o
  CFLAGS += -DP_SSL_MBEDTLS -I../mbedtls/include
endif

OBJ1=overlay_client.o

all: $(LIB_A)

$(LIB_A): $(OBJ) $(OBJNOFS)
	$(AR) $@ $(OBJ) $(OBJNOFS)
	$(RANLIB) $@

fs: $(OBJ) $(OBJFS)
	$(AR) $(LIB_A) $(OBJ) $(OBJFS)
	$(RANLIB) $(LIB_A)

debugfs: fs
	CFLAGS += -DDEBUG_LEVEL=${DEBUG}

cli: fs
	$(CC) $(CFLAGS) -o cli cli.c $(LIB_A) $(LDFLAGS)
	
overlay_client:
	cd ./lib/poverlay_linux && make

clean:
	rm -f *~ *.o $(LIB_A) ./lib/poverlay_linux/*.o ./lib/poverlay_linux/overlay_client

Since the original build failed I ran ..
2. compile the lib/pclsync/
cd ~/Downloads/console-client/pCloudCC
make clean
rm CMakeCache.txt
cd lib/pclsync/
make clean
make
cd ../..
cmake .
make

Should show a T if it worked
nm lib/pclsync/psynclib.a | grep psync_cloud_crypto_start

  • example output:
$ nm psynclib.a | grep psync_cloud_crypto_start
                U psync_cloud_crypto_start
0000000000003e90 T psync_cloud_crypto_start
  1. make pcloundcc
    cd ../..
    cmake .
    make
    sudo make install
    pcloudcc -h
  • update shared library cache to "make the cli find" pcloudcc
    sudo ldconfig
    Should now show the pclound client help
    pcloudcc -h

pcloudcc -u YOUR_USERNAME@somemail.com -p

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions